Added test cases
authorAdrien Kirjak <adrien.kirjak@ericsson.com>
Tue, 2 Aug 2016 11:46:22 +0000 (13:46 +0200)
committerAdrien Kirjak <adrien.kirjak@ericsson.com>
Tue, 2 Aug 2016 11:46:22 +0000 (13:46 +0200)
Signed-off-by: Adrien Kirjak <adrien.kirjak@ericsson.com>
12 files changed:
conformance_test/positive_tests/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_032_extern .cc [deleted file]
conformance_test/positive_tests/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_050.ttcn
conformance_test/positive_tests/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_051.ttcn
conformance_test/positive_tests/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_049.ttcn
conformance_test/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_001.ttcn
conformance_test/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_002.ttcn
conformance_test/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_003.ttcn
conformance_test/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_004.ttcn
conformance_test/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_005.ttcn
conformance_test/positive_tests/pos_conf_tests.cfg
conformance_test/positive_tests/pos_conf_tests.tpd
usrguide/SoC_TITAN.docx

diff --git a/conformance_test/positive_tests/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_032_extern .cc b/conformance_test/positive_tests/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_032_extern .cc
deleted file mode 100644 (file)
index 22e469e..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/*****************************************************************\r
- ** @author   STF 470\r
- ** @version  0.0.1\r
- ** @purpose  1:8.2.3.1, Verify that identifiers of parameter types are not imported together with external functions\r
- ** @verdict  pass reject\r
- *****************************************************************/\r
-\r
-#include "NegSem_08020301_GeneralFormatOfImport_031_import.hh"\r
-\r
-namespace NegSem__08020301__GeneralFormatOfImport__032__import\r
-{\r
-       void f__test()\r
-    { \r
-               MyType p = 1;\r
-               return p;\r
-       }\r
-}\r
index 387eb6463602f64fd882570b949b90c9e9bd8abf..c39505a548f592d9e18b642d6e3a8735f34eb1ac 100644 (file)
@@ -22,7 +22,7 @@ module NegSem_1508_TemplateRestrictions_050 {
        type record Mymessage {
                integer field1,
                bitstring field2 optional
-    }
+    } with { variant " "};
        
 
     type port loopbackPort message
@@ -70,5 +70,5 @@ module NegSem_1508_TemplateRestrictions_050 {
                execute(TC_NegSem_1508_TemplateRestrictions_050());
        }
 
-}
+} with { encode "RAW"}
  
index bdd64264a01c15f1980abc23b1d2f886e6463853..4cea888161044c059f35042be073ec03f1e94fed 100644 (file)
@@ -22,10 +22,10 @@ module NegSem_1508_TemplateRestrictions_051 {
        type record Mymessage {
                integer field1,
                bitstring field2 optional
-    }
+    } with { variant " "};
        
     type port loopbackPort message
-       {inout MessageType} {extension "internal"};
+       {inout MessageType} with {extension "internal"};
        
     type component GeneralComp {                   
            port loopbackPort messagePort
@@ -66,5 +66,5 @@ module NegSem_1508_TemplateRestrictions_051 {
                execute(TC_NegSem_1508_TemplateRestrictions_051());
        }
 
-}
+} with { encode "RAW"}
  
index 5e48faff4d64b2f384f38ce64361dbd085527ad7..86690cc2f0ff0f8ca87bc8521bfe9d6a9c442965 100644 (file)
@@ -13,6 +13,7 @@
  ** @verdict  pass accept, ttcn3verdict:pass
  ***************************************************/
 
+//RAW encoding adds extra bits, up to 8 bit, to a bitstring because it encodes anything into an octetstring
 
 module Sem_1508_TemplateRestrictions_049 { 
 
@@ -23,7 +24,7 @@ module Sem_1508_TemplateRestrictions_049 {
        type record Mymessage {
                integer field1,
                bitstring field2 optional
-    }
+    } with { variant " "};
        
 
        type port loopbackPort message
@@ -38,6 +39,9 @@ module Sem_1508_TemplateRestrictions_049 {
                var bitstring v_enc;
                var Mymessage v_testMessage;
                var MessageType Message;
+
+               var MessageType got;
+               var Mymessage dec_got;
                
                v_testMessage:=  {  
                    field1 := 10,
@@ -48,17 +52,22 @@ module Sem_1508_TemplateRestrictions_049 {
                      
                template (present) MessageType mw_matchingTemplate:=
                {                       
-                       payload :=  decmatch Mymessage: {field1:= 10, field2 := '1001'B}
+                       payload :=  decmatch Mymessage: {field1:= 10, field2 := '00001001'B}
                } 
 
+               connect(self:messagePort, self:messagePort);
                messagePort.send(Message);      //send message
 
+               var bitstring bitpayload := hex2bit(Message.payload);
+
+               var integer v_res := decvalue(bitpayload, dec_got);
+
                alt {
                        [] messagePort.receive(mw_matchingTemplate) {
                        setverdict(pass);
                        }
-                       [] messagePort.receive {
-                       setverdict(fail,mw_matchingTemplate);
+                       [] messagePort.receive(MessageType:?) -> value got  {
+                       setverdict(fail,"exepted: ", mw_matchingTemplate, " recieved: ", dec_got);
                        }
                }
     
@@ -68,5 +77,5 @@ module Sem_1508_TemplateRestrictions_049 {
                execute(TC_Sem_1508_TemplateRestrictions_049());
        }
 
-}
+} with { encode "RAW"}
  
index 41151decce37f761af539cb2be886cb4244a129e..08012521779da63e1cfc24e1a1c8a90be2a98113 100644 (file)
@@ -17,6 +17,8 @@
 /*It can be assigned to templates and template fields of bitstring, hexstring, octetstring,
 charstring and universal charstring types.*/
 
+//RAW encoding adds extra bits, up to 8 bit, to a bitstring because it encodes anything into an octetstring
+
 module Sem_B010209_decoded_content_001 { 
 
        type record MessageType {
@@ -26,7 +28,7 @@ module Sem_B010209_decoded_content_001 {
        type record Mymessage {
                integer         field1,
                bitstring       field2 optional
-    }
+    } with { variant " "};
        
 
     type port loopbackPort message { 
@@ -51,7 +53,7 @@ module Sem_B010209_decoded_content_001 {
                Message.payload := encvalue(v_testMessage);             //encode message to payload
           
                template MessageType mw_matchingTemplate:= {                    
-                       payload :=  decmatch Mymessage: {field1:= 10, field2 := '1001'B}
+                       payload :=  decmatch Mymessage: {field1:= 10, field2 := '00001001'B}
                } 
 
                connect(self:messagePort, self:messagePort);
@@ -72,5 +74,5 @@ module Sem_B010209_decoded_content_001 {
                execute(TC_Sem_B010209_decoded_content_001());
        }
 
-}
+} with { encode "RAW"}
  
index 9ecfccee6c501578908d54c47a8e8fc3e871d053..65b73dde0a30ebbdfc5d4d806be33f167ba00c15 100644 (file)
@@ -17,6 +17,8 @@
 /*It can be assigned to templates and template fields of bitstring, hexstring, octetstring,
 charstring and universal charstring types.*/
 
+//RAW encoding adds extra bits, up to 8 bit, to a bitstring because it encodes anything into an octetstring
+
 module Sem_B010209_decoded_content_002 { 
 
        type record MessageType {
@@ -26,7 +28,7 @@ module Sem_B010209_decoded_content_002 {
        type record Mymessage {
                integer field1,
                bitstring field2 optional
-    }
+    } with { variant " "};
 
     type port loopbackPort message {
                inout MessageType
@@ -49,7 +51,7 @@ module Sem_B010209_decoded_content_002 {
        Message.payload := bit2hex(encvalue(v_testMessage)); //encode message to payload, hexstring
 
                template MessageType mw_matchingTemplate:= {                    
-                       payload :=  decmatch Mymessage: {field1:= 10, field2 := '1001'B}
+                       payload :=  decmatch Mymessage: {field1:= 10, field2 := '00001001'B}
                } 
 
                connect(self:messagePort, self:messagePort);
@@ -70,5 +72,5 @@ module Sem_B010209_decoded_content_002 {
                execute(TC_Sem_B010209_decoded_content_002());
        }
 
-}
+} with { encode "RAW"}
  
index 117b2f8277ee0463291501d63780e4b29ee6ee32..0247c2c3d2dc421b57c26d80d27f5823852c7caa 100644 (file)
@@ -17,6 +17,8 @@
 /*It can be assigned to templates and template fields of bitstring, hexstring, octetstring,
 charstring and universal charstring types.*/
 
+//RAW encoding adds extra bits, up to 8 bit, to a bitstring because it encodes anything into an octetstring
+
 module Sem_B010209_decoded_content_003 { 
 
        type record MessageType {
@@ -26,11 +28,12 @@ module Sem_B010209_decoded_content_003 {
        type record Mymessage {
                integer field1,
                bitstring field2 optional
-    }
+    } with { variant " "};
        
-    type port loopbackPort message{inout MessageType};
+    type port loopbackPort message     {
+               inout MessageType
+       } with {extension "internal"};
        
-
        type component GeneralComp {                
                port loopbackPort messagePort
        }       
@@ -48,7 +51,7 @@ module Sem_B010209_decoded_content_003 {
        Message.payload := bit2oct(encvalue(v_testMessage))//encode message to payload, octetstring
           
                template MessageType mw_matchingTemplate:= {                    
-                       payload :=  decmatch Mymessage: {field1:= 10, field2 := '1001'B}
+                       payload :=  decmatch Mymessage: {field1:= 10, field2 := '00001001'B}
                } 
 
                connect(self:messagePort, self:messagePort);
@@ -69,5 +72,5 @@ module Sem_B010209_decoded_content_003 {
                execute(TC_Sem_B010209_decoded_content_003());
        }
 
-}
+} with { encode "RAW"}
  
index 6ecc81fef60da153671b2a9209f9f9cb8936b133..0414c3578f047afc5c15a31e9e5241a4c6a9447f 100644 (file)
@@ -24,7 +24,7 @@ module Sem_B010209_decoded_content_004 {
         charstring payload
     }
     
-    type integer MyInt with { encode "32bit" }
+    type integer MyInt with { variant "32 bit" }
 
     type port loopbackPort message{
                inout MessageType
@@ -37,23 +37,24 @@ module Sem_B010209_decoded_content_004 {
     const MyInt c_input := 1633837665;
     
     template MessageType mw_matchingTemplate:= {                       
-        payload :=  decmatch MyInt:c_input
-    
+      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
+               var MessageType got;
+
+               v_message.payload := oct2char(bit2oct(encvalue(c_input)));
               
                connect(self:messagePort, self:messagePort);
         messagePort.send(v_message); //send message
-    
+
         alt {
             [] messagePort.receive(mw_matchingTemplate) {
                 setverdict(pass);
             }
-            [] messagePort.receive {
-                setverdict(fail,mw_matchingTemplate);
+            [] messagePort.receive(MessageType:?) -> value got {
+                setverdict(fail,"exepted: ", mw_matchingTemplate, " recieved: ", got);
             }
         }
     }
@@ -62,5 +63,5 @@ module Sem_B010209_decoded_content_004 {
         execute(TC_Sem_B010209_decoded_content_004());
     }
 
-}
+} with { encode "RAW"}
  
index 22a4c3ffaeba37bf25dc662eadc22fb0b257d309..add9c9667431625375d16129fa1eea985e620b1e 100644 (file)
@@ -24,7 +24,7 @@ module Sem_B010209_decoded_content_005 {
         universal charstring payload
     }
     
-    type integer MyInt with { encode "32bit" }
+    type integer MyInt with { variant "32 bit" };
 
     type port loopbackPort message{
                inout MessageType
@@ -42,18 +42,20 @@ module Sem_B010209_decoded_content_005 {
     
     testcase TC_Sem_B010209_decoded_content_005() runs on GeneralComp {
         var MessageType v_message;
+               var MessageType got;
     
         v_message.payload := encvalue_unichar(c_input); //encode message to payload, charstring
               
                connect(self:messagePort, self:messagePort);
         messagePort.send(v_message); //send message
+
     
         alt {
             [] messagePort.receive(mw_matchingTemplate) {
                 setverdict(pass);
             }
-            [] messagePort.receive {
-                setverdict(fail,mw_matchingTemplate);
+            [] messagePort.receive(MessageType:?) -> value got {
+                setverdict(fail,"exepted: ", mw_matchingTemplate, " recieved: ", got);
             }
         }
        
@@ -63,5 +65,5 @@ module Sem_B010209_decoded_content_005 {
         execute(TC_Sem_B010209_decoded_content_005());
     }
 
-}
+} with { encode "RAW"}
  
index 5351c70b13c32a924a76be3faaaf15ed47805026..51c4a0dcc4c40225f7944346c59c71c5a6f7d7dd 100644 (file)
@@ -692,6 +692,7 @@ Sem_1508_TemplateRestrictions_020.control
 Sem_1508_TemplateRestrictions_021.control
 Sem_1508_TemplateRestrictions_022.control
 Sem_1508_TemplateRestrictions_023.control
+Sem_1508_TemplateRestrictions_049.control
 Sem_1509_MatchOperation_001.control
 Sem_1509_MatchOperation_002.control
 Sem_1509_MatchOperation_003.control
@@ -1108,6 +1109,11 @@ Sem_B010208_omit_value_001.control
 Sem_B010208_omit_value_002.control
 Sem_B010208_omit_value_003.control
 Sem_B010208_omit_value_004.control
+Sem_B010209_decoded_content_001.control
+Sem_B010209_decoded_content_002.control
+Sem_B010209_decoded_content_003.control
+Sem_B010209_decoded_content_004.control
+Sem_B010209_decoded_content_005.control
 Sem_B010301_any_element_001.control
 Sem_B010301_any_element_002.control
 Sem_B010301_any_element_003.control
index d55c2f9cb58e93ff6e3d4c3c3d5ef8b4f994fdd0..90f5dfbe4f358f019d54a8cd902ee36c246ef468 100644 (file)
 <!--    <FileResource projectRelativePath="15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_046.ttcn" relativeURI="15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_046.ttcn"/>-->
 <!--   <FileResource projectRelativePath="15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_047.ttcn" relativeURI="15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_047.ttcn"/> -->
 <!--    <FileResource projectRelativePath="15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_048.ttcn" relativeURI="15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_048.ttcn"/>-->
-<!--    <FileResource projectRelativePath="15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_049.ttcn" relativeURI="15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_049.ttcn"/>-->
+    <FileResource projectRelativePath="15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_049.ttcn" relativeURI="15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_049.ttcn"/>
     <FileResource projectRelativePath="15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_001.ttcn" relativeURI="15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_001.ttcn"/>
     <FileResource projectRelativePath="15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_002.ttcn" relativeURI="15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_002.ttcn"/>
     <FileResource projectRelativePath="15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_003.ttcn" relativeURI="15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_003.ttcn"/>
     <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_002.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_002.ttcn"/>
     <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_003.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_003.ttcn"/>
     <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_004.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/Sem_B010208_omit_value_004.ttcn"/>
-<!--    <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_001.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_001.ttcn"/>-->
-<!--    <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_002.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_002.ttcn"/>-->
-<!--    <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_003.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_003.ttcn"/>-->
-<!--    <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_004.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_004.ttcn"/>-->
-<!--    <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_005.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_005.ttcn"/>-->
+    <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_001.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_001.ttcn"/>
+    <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_002.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_002.ttcn"/>
+    <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_003.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_003.ttcn"/>
+    <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_004.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_004.ttcn"/>
+    <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_005.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_005.ttcn"/>
     <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_001.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_001.ttcn"/>
     <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_002.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_002.ttcn"/>
     <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_003.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_003.ttcn"/>
index c6a80105fb63b00a53be831d6b6ce6feaf0f6845..2aea5255ff0dffa105974a9d89d5982d2efa2f26 100644 (file)
Binary files a/usrguide/SoC_TITAN.docx and b/usrguide/SoC_TITAN.docx differ
This page took 0.032083 seconds and 5 git commands to generate.