Skip to content
Snippets Groups Projects
Commit 832ffd93 authored by Elemer Lelik's avatar Elemer Lelik
Browse files

Merge pull request #31 from eadrkir/master

conformance_test/positive_tests added
parents 77bd56cd 4e4a3e2c
No related branches found
No related tags found
No related merge requests found
Showing
with 646 additions and 0 deletions
##############################################################################
# Copyright (c) 2000-2016 Ericsson Telecom AB
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Kirjak, Adrien
#
# not ready
##############################################################################
#TOPDIR := ..
#include $(TOPDIR)/Makefile.regression
#ifdef LCOV
#COVERAGE_FLAG := -C
#endif
MAKE := make
#DIRS := negative_tests positive_tests
DIRS := positive_tests
WORKING_DIR := $(shell pwd)
# It can be built manually.
run clean:
echo "hello"
@for dir in $(DIRS); do make $@ -C $$dir || exit; done
.PHONY: all clean run
/******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Adrien Kirjak – initial implementation
*
** @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);
}
}
/******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Adrien Kirjak – initial implementation
*
** @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);
}
}
/******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Adrien Kirjak – initial implementation
*
** @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);
}
}
/******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Adrien Kirjak – initial implementation
*
** @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());
}
}
/******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Adrien Kirjak – initial implementation
*
** @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());
}
}
/******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Adrien Kirjak – initial implementation
*
** @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());
}
}
/******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Adrien Kirjak – initial implementation
*
** @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());
}
}
/******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Adrien Kirjak – initial implementation
*
** @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());
}
}
/******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Adrien Kirjak – initial implementation
*
** @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());
}
}
/******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Adrien Kirjak – initial implementation
*
** @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());
}
}
/******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Adrien Kirjak – initial implementation
*
** @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());
}
}
/******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Adrien Kirjak – initial implementation
*
** @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());
}
}
/******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Adrien Kirjak – initial implementation
*
** @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());
}
}
/******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Adrien Kirjak – initial implementation
*
** @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 := false;
if(NegSem_050202_Uniqueness_011 == false)
{ setverdict(pass); }
else
{ setverdict(fail); }
}
testcase TC_NegSem_050202_Uniqueness_011() runs on GeneralComp {
f_funcScope();
}
control {
execute(TC_NegSem_050202_Uniqueness_011());
}
}
/******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Adrien Kirjak – initial implementation
*
** @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 := false;
if(NegSem_050202_Uniqueness_012_import == false)
{ setverdict(pass); }
else
{ setverdict(fail); }
}
testcase TC_NegSem_050202_Uniqueness_012() runs on GeneralComp {
f_funcScope();
}
control {
execute(TC_NegSem_050202_Uniqueness_012());
}
}
/******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Adrien Kirjak – initial implementation
*
** @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 {
const integer c_integer := 0;
control {}
}
/******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Adrien Kirjak – initial implementation
*
** @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());
}
}
/******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Adrien Kirjak – initial implementation
*
** @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 {
const integer repeatedIdentifier := 0; // repeated indentifier from imported module is allowed
control {}
}
/******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Adrien Kirjak – initial implementation
*
** @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());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment