Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eclipse Projects
Eclipse Titan
titan.core
Commits
43148e96
Commit
43148e96
authored
Sep 28, 2016
by
ebensza
Committed by
Gerrit Code Review
Sep 28, 2016
Browse files
Merge "Added tests / minor fixes"
parents
e9cc7f1a
d4578e84
Changes
35
Hide whitespace changes
Inline
Side-by-side
conformance_test/core_language_tests/negative_tests/05_basic_language_elements.script
View file @
43148e96
...
...
@@ -310,6 +310,320 @@ error: There is no local or imported definition with name `v_statement'
<END_TC>
:exmp
*---------------------------------------------------------------------*
:h3. NegSem_050202_Uniqueness_001 negative test
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Ensure that the IUT correctly handles the uniqueness of variable names in its scope >
<COMPILE>
<MODULE TTCN NegSem_050202_Uniqueness_001 NegSem_050202_Uniqueness_001.ttcn >
/******************************************************************************
** @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());
}
}
<END_MODULE>
<RESULT COUNT 1>
error: Definition with identifier `cl_int' is not unique in the scope hierarchy
<END_RESULT>
<END_TC>
:exmp
*---------------------------------------------------------------------*
:h3. NegSem_050202_Uniqueness_004 negative test
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Ensure that the IUT correctly handles the uniqueness of variable names in its scope >
<COMPILE>
<MODULE TTCN NegSem_050202_Uniqueness_004 NegSem_050202_Uniqueness_004.ttcn >
/******************************************************************************
** @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());
}
}
<END_MODULE>
<RESULT COUNT 1>
error: Definition with identifier `c_int' is not unique in the scope hierarchy
<END_RESULT>
<END_TC>
:exmp
*---------------------------------------------------------------------*
:h3. NegSem_050202_Uniqueness_005 negative test
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Ensure that the IUT correctly handles the uniqueness of variable names in its scope >
<COMPILE>
<MODULE TTCN NegSem_050202_Uniqueness_005 NegSem_050202_Uniqueness_005.ttcn >
/******************************************************************************
** @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());
}
}
<END_MODULE>
<RESULT COUNT 1>
error: Definition with identifier `c_int' is not unique in the scope hierarchy
<END_RESULT>
<END_TC>
:exmp
*---------------------------------------------------------------------*
:h3. NegSem_050202_Uniqueness_006 negative test
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Ensure that the IUT correctly handles the uniqueness of variable names in its scope >
<COMPILE>
<MODULE TTCN NegSem_050202_Uniqueness_006 NegSem_050202_Uniqueness_006.ttcn >
/******************************************************************************
** @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());
}
}
<END_MODULE>
<RESULT COUNT 1>
error: Definition with identifier `repeatedIdentifier' is not unique in the scope hierarchy
<END_RESULT>
<END_TC>
:exmp
*---------------------------------------------------------------------*
:h3. NegSem_050202_Uniqueness_007 negative test
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Ensure that the IUT correctly handles the uniqueness of variable names in its scope >
<COMPILE>
<MODULE TTCN NegSem_050202_Uniqueness_007 NegSem_050202_Uniqueness_007.ttcn >
/******************************************************************************
** @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());
}
}
<END_MODULE>
<RESULT COUNT 1>
error: Definition with identifier `repeatedIdentifier' is not unique in the scope hierarchy
<END_RESULT>
<END_TC>
:exmp
*---------------------------------------------------------------------*
:h3. NegSem_050202_Uniqueness_008 negative test
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Ensure that the IUT correctly handles the uniqueness of variable names in its scope >
<COMPILE>
<MODULE TTCN NegSem_050202_Uniqueness_008 NegSem_050202_Uniqueness_008.ttcn >
/******************************************************************************
** @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());
}
}
<END_MODULE>
<RESULT COUNT 1>
error: Definition with identifier `repeatedIdentifier' is not unique in the scope hierarchy
<END_RESULT>
<END_TC>
:exmp
*---------------------------------------------------------------------*
:h3. NegSem_050202_Uniqueness_009 negative test
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Ensure that the IUT correctly handles the uniqueness of variable names in its scope >
<COMPILE>
<MODULE TTCN NegSem_050202_Uniqueness_009 NegSem_050202_Uniqueness_009.ttcn >
/******************************************************************************
** @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());
}
}
<END_MODULE>
<RESULT COUNT 1>
error: Definition with identifier `repeatedIdentifier' is not unique in the scope hierarchy
<END_RESULT>
<END_TC>
:exmp
*---------------------------------------------------------------------*
:h3. NegSem_050202_Uniqueness_010 negative test
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Ensure that the IUT correctly handles the uniqueness of variable names in its scope >
<COMPILE>
<MODULE TTCN NegSem_050202_Uniqueness_010 NegSem_050202_Uniqueness_010.ttcn >
/******************************************************************************
** @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());
}
}
<END_MODULE>
<RESULT COUNT 1>
error: Definition with identifier `repeatedIdentifier' is not unique in the scope hierarchy
<END_RESULT>
<END_TC>
:exmp
.*---------------------------------------------------------------------*
:h2. 0503_ordering_of_declarations folder
.*---------------------------------------------------------------------*
...
...
conformance_test/core_language_tests/negative_tests/06_types_and_values.script
View file @
43148e96
...
...
@@ -54,7 +54,7 @@ This TD contains negative tests from ETSI TTCN3 Conformance Test's 06_types_and_
.*---------------------------------------------------------------------*
*---------------------------------------------------------------------*
:h3. NegS
em
_0
5
01
_Identifier
_001 negative test
:h3. NegS
yn
_0
6
01
00_SimpleBasicTypes
_001 negative test
.*---------------------------------------------------------------------*
:xmp tab=0.
...
...
@@ -62,7 +62,7 @@ This TD contains negative tests from ETSI TTCN3 Conformance Test's 06_types_and_
<COMPILE>
<MODULE TTCN NegS
em
_0
5
01
_Identifier
_001 NegS
em
_0
5
01
_Identifier
_001.ttcn >
<MODULE TTCN NegS
yn
_0
6
01
00_SimpleBasicTypes
_001 NegS
yn
_0
6
01
00_SimpleBasicTypes
_001.ttcn >
/***************************************************
** @version 0.0.1
** @purpose 1:6.1.0, Assign float to integer values
...
...
@@ -81,7 +81,7 @@ error: integer value was expected
:exmp
*---------------------------------------------------------------------*
:h3. NegS
em
_0
5
01
_Identifier
_002 negative test
:h3. NegS
yn
_0
6
01
00_SimpleBasicTypes
_002 negative test
.*---------------------------------------------------------------------*
:xmp tab=0.
...
...
@@ -89,7 +89,7 @@ error: integer value was expected
<COMPILE>
<MODULE TTCN NegS
em
_0
5
01
_Identifier
_002 NegS
em
_0
5
01
_Identifier
_002.ttcn >
<MODULE TTCN NegS
yn
_0
6
01
00_SimpleBasicTypes
_002 NegS
yn
_0
6
01
00_SimpleBasicTypes
_002.ttcn >
/***************************************************
** @version 0.0.1
** @purpose 1:6.1.0, Assign boolean to integer values
...
...
@@ -108,7 +108,7 @@ error: integer value was expected
:exmp
*---------------------------------------------------------------------*
:h3. NegS
em
_0
5
01
_Identifier
_003 negative test
:h3. NegS
yn
_0
6
01
00_SimpleBasicTypes
_003 negative test
.*---------------------------------------------------------------------*
:xmp tab=0.
...
...
@@ -116,7 +116,7 @@ error: integer value was expected
<COMPILE>
<MODULE TTCN NegS
em
_0
5
01
_Identifier
_003 NegS
em
_0
5
01
_Identifier
_003.ttcn >
<MODULE TTCN NegS
yn
_0
6
01
00_SimpleBasicTypes
_003 NegS
yn
_0
6
01
00_SimpleBasicTypes
_003.ttcn >
/***************************************************
** @version 0.0.1
** @purpose 1:6.1.0, Assign integer to float values
...
...
@@ -135,7 +135,7 @@ error: float value was expected
:exmp
*---------------------------------------------------------------------*
:h3. NegS
em
_0
5
01
_Identifier
_004 negative test
:h3. NegS
yn
_0
6
01
00_SimpleBasicTypes
_004 negative test
.*---------------------------------------------------------------------*
:xmp tab=0.
...
...
@@ -143,7 +143,7 @@ error: float value was expected
<COMPILE>
<MODULE TTCN NegS
em
_0
5
01
_Identifier
_004 NegS
em
_0
5
01
_Identifier
_004.ttcn >
<MODULE TTCN NegS
yn
_0
6
01
00_SimpleBasicTypes
_004 NegS
yn
_0
6
01
00_SimpleBasicTypes
_004.ttcn >
/***************************************************
** @version 0.0.1
** @purpose 1:6.1.0, Assign boolean to float values
...
...
@@ -162,7 +162,7 @@ error: float value was expected
:exmp
*---------------------------------------------------------------------*
:h3. NegS
em
_0
5
01
_Identifier
_005 negative test
:h3. NegS
yn
_0
6
01
00_SimpleBasicTypes
_005 negative test
.*---------------------------------------------------------------------*
:xmp tab=0.
...
...
@@ -170,7 +170,7 @@ error: float value was expected
<COMPILE>
<MODULE TTCN NegS
em
_0
5
01
_Identifier
_005 NegS
em
_0
5
01
_Identifier
_005.ttcn >
<MODULE TTCN NegS
yn
_0
6
01
00_SimpleBasicTypes
_005 NegS
yn
_0
6
01
00_SimpleBasicTypes
_005.ttcn >
/***************************************************
** @version 0.0.1
** @purpose 1:6.1.0, Assign verdicttype to float values
...
...
@@ -189,7 +189,7 @@ error: float value was expected
:exmp
*---------------------------------------------------------------------*
:h3. NegS
em
_0
5
01
_Identifier
_006 negative test
:h3. NegS
yn
_0
6
01
00_SimpleBasicTypes
_006 negative test
.*---------------------------------------------------------------------*
:xmp tab=0.
...
...
@@ -197,7 +197,7 @@ error: float value was expected
<COMPILE>
<MODULE TTCN NegS
em
_0
5
01
_Identifier
_006 NegS
em
_0
5
01
_Identifier
_006.ttcn >
<MODULE TTCN NegS
yn
_0
6
01
00_SimpleBasicTypes
_006 NegS
yn
_0
6
01
00_SimpleBasicTypes
_006.ttcn >
/***************************************************
** @version 0.0.1
** @purpose 1:6.1.0, Assign integer to verdicttype values
...
...
@@ -2142,6 +2142,45 @@ error: "abcyz" is not a valid value for type `charstring' which has subtype patt
<END_TC>
:exmp
*---------------------------------------------------------------------*
:h3. NegSyn_06010205_StringPattern_001 negative test
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Assign values to pattern restricted character strings without @nocase modifier. >
<COMPILE>
<MODULE TTCN NegSyn_06010205_StringPattern_001 NegSyn_06010205_StringPattern_001.ttcn >
/******************************************************************************
** @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());
}
}
<END_MODULE>
<RESULT COUNT 1>
error: "ABc1234xYz" is not a valid value for type `charstring' which has subtype pattern\(abc\*xyz\)
<END_RESULT>
<END_TC>
:exmp
*---------------------------------------------------------------------*
:h3. NegSyn_06010205_StringPattern_002 negative test
.*---------------------------------------------------------------------*
...
...
@@ -4409,7 +4448,7 @@ error: union value was expected for type `@NegSem_060205_top_level_005.U'
:exmp
*---------------------------------------------------------------------*
:h3. NegS
em
_060205_top_level_00
5
negative test
:h3. NegS
yn
_060205_top_level_00
1
negative test
.*---------------------------------------------------------------------*
:xmp tab=0.
...
...
@@ -5009,7 +5048,7 @@ error: Type `address' is not defined in this module
:exmp
*---------------------------------------------------------------------*
:h3. NegS
em
_060206_anytype_002 negative test
:h3. NegS
yn
_060206_anytype_002 negative test
.*---------------------------------------------------------------------*
:xmp tab=0.
...
...
@@ -5017,7 +5056,7 @@ error: Type `address' is not defined in this module
<COMPILE>
<MODULE TTCN NegS
em
_060206_anytype_002 NegS
em
_060206_anytype_002.ttcn >
<MODULE TTCN NegS
yn
_060206_anytype_002 NegS
yn
_060206_anytype_002.ttcn >
/****************************************************
** @version 0.0.1
** @purpose 1:6.2.0.6, ensure that anytype cannot be port type
...
...
conformance_test/core_language_tests/negative_tests/07-14_folder.script
View file @
43148e96
...
...
@@ -1103,6 +1103,54 @@ error: Incompatible explicit type specification: `integer' was expected instead
<END_TC>
:exmp
*---------------------------------------------------------------------*
:h3. NegSem_08020301_GeneralFormatOfImport_038 negative test
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Verify that definition from inside an imported function cannot be referenced >
<COMPILE>
<MODULE TTCN NegSem_08020301_GeneralFormatOfImport_038 NegSem_08020301_GeneralFormatOfImport_038.ttcn >
/******************************************************************************
** @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;
}
<END_MODULE>
<MODULE TTCN NegSem_08020301_GeneralFormatOfImport_038_import NegSem_08020301_GeneralFormatOfImport_038_import.ttcn >
module NegSem_08020301_GeneralFormatOfImport_038_import {
function f_test() {
const integer c_test := 1;
}
}
<END_MODULE>
<RESULT COUNT 1>
error: There is no local or imported definition with name `c_test'
<END_RESULT>
<END_TC>
:exmp
*---------------------------------------------------------------------*
:h3. NegSyn_08020301_GeneralFormatOfImport_001 negative test
.*---------------------------------------------------------------------*
...
...
@@ -1715,7 +1763,7 @@ error: There is no local or imported definition with name `c_myconst'
:exmp
*---------------------------------------------------------------------*
:h3. NegS
em
_080
205_VisibilityOfDefinitions
_00
5
negative test
:h3. NegS
yn
_080
3_ModuleControlPart
_00
1
negative test
.*---------------------------------------------------------------------*
:xmp tab=0.
...
...
@@ -1723,7 +1771,7 @@ error: There is no local or imported definition with name `c_myconst'
<COMPILE>
<MODULE TTCN NegS
em
_080
205_VisibilityOfDefinitions
_00
5
NegS
em
_080
205_VisibilityOfDefinitions
_00
5
.ttcn >
<MODULE TTCN NegS
yn
_080
3_ModuleControlPart
_00
1
NegS
yn
_080
3_ModuleControlPart
_00
1
.ttcn >
/*****************************************************************
** @version 0.0.1
** @purpose 1:8.3, Ensure that there is not more than one control part.
...
...
@@ -2936,7 +2984,7 @@ error: at or before token `1.0': syntax error, unexpected FloatValue, expecting
:h2. 14_procedure_signatures folder
.*---------------------------------------------------------------------*
*---------------------------------------------------------------------*
:h3. egSem_1400_procedure_signatures_001 negative test
:h3.
N
egSem_1400_procedure_signatures_001 negative test
.*---------------------------------------------------------------------*
:xmp tab=0.
...
...
@@ -2944,7 +2992,7 @@ error: at or before token `1.0': syntax error, unexpected FloatValue, expecting
<COMPILE>
<MODULE TTCN egSem_1400_procedure_signatures_001 egSem_1400_procedure_signatures_001.ttcn >
<MODULE TTCN
N
egSem_1400_procedure_signatures_001
N
egSem_1400_procedure_signatures_001.ttcn >
/*****************************************************************
** @version 0.0.1
** @purpose 1:22.3.1, Ensure that nonblocking signature contains in parameter
...
...
@@ -3006,7 +3054,7 @@ error: A non-blocking signature cannot have `out' parameter
:exmp
*---------------------------------------------------------------------*
:h3. egSem_1400_procedure_signatures_002 negative test
:h3.
N
egSem_1400_procedure_signatures_002 negative test
.*---------------------------------------------------------------------*
:xmp tab=0.
...
...
@@ -3014,7 +3062,7 @@ error: A non-blocking signature cannot have `out' parameter
<COMPILE>
<MODULE TTCN egSem_1400_procedure_signatures_002 egSem_1400_procedure_signatures_002.ttcn >
<MODULE TTCN
N
egSem_1400_procedure_signatures_002
N
egSem_1400_procedure_signatures_002.ttcn >
/*****************************************************************
** @version 0.0.1
** @purpose 1:14, Ensure that blocking calls needs response or exception handling
...
...