Commit 794e8641 authored by balaskoa's avatar balaskoa
Browse files

New testcases have been mapped from titan.core 1.


Signed-off-by: default avatarbalaskoa <Jeno.Balasko@ericsson.com>
parent 1d59fe29
......@@ -2,6 +2,12 @@
# This section shall contain the values of all parameters that are defined in your TTCN-3 modules.
[EXECUTE]
#==acceptance_test==
#chinese
#chinese.control #only in parallel - verdict fail and error tests, do not run them!
#comptest # only parallel, see in parallel_main
Fibonacci #no verdict, just code from the begginning
#testerlanc # only parallel, ok, 1 pass but too long
#==all from:==
all_from_complement
all_from_permutation
......@@ -14,6 +20,20 @@ all_from_var
all_from
sapc.control
#everything - no control part, TODO: repair the test, rework the whole! It was just a sketch.
#any_from
#any_from #only in parallel
#==anytype:==
AnytypeTest
AnyUser.control #case insensitivity problem - DO NOT handle this yet! Hacked
noany
smallany
#Supplier #in titan.core is excluded as well
#==anytypeOper:==
TanytypeOper
TanytypeWrapOper
#arrayOper:
TarrayOper
#
#json (There are testcases commented out in it!! In preinit of JsonTypes it stops with exception)
#AttributeTestcases.control
......
###############################################################################
# Copyright (c) 2000-2019 Ericsson Telecom AB
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v2.0
# which accompanies this distribution, and is available at
# https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
#
# Contributors:
# Balasko, Jeno
# Gecse, Roland
#
###############################################################################
[EXECUTE]
Fibonacci.control
/******************************************************************************
* Copyright (c) 2000-2019 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
*
* Contributors:
* Balasko, Jeno
* Gecse, Roland
* Szabados, Kristof
*
******************************************************************************/
module Fibonacci {
const integer NTIMES := 10, NUMBER := 30;
/* another recursive little rascal */
function fib(in integer x) return integer
{
if (x > 2) {
return (fib(x-1)+fib(x-2));
} else {
return (1);
}
}
control
{
var integer i, v;
for (i := 1; i <= NTIMES; i := i + 1)
{
v := fib(NUMBER);
}
// temp = fib(value);
}
}
/******************************************************************************
* Copyright (c) 2000-2019 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
*
* Contributors:
* Balasko, Jeno
* Gecse, Roland
* Szabados, Kristof
*
******************************************************************************/
//******* Next version : function and ptc(create/start/stop/running/done) **********//
// List of test items
//
// 1.verdict : one PTC in a testcase
// 2.verdict : two PTCs in a testcase
// 3.PTC operation(running/stop/done)
//
module chinese // Build2
{
type component MyMtcType
{
}
type component MyPtcType1
{
}
function fn_ptc_verdict_get() runs on MyPtcType1
{
//getverdict;
var integer i;
}
function fn_ptc_verdict_pass() runs on MyPtcType1
{
setverdict(pass);
}
function fn_ptc_verdict_fail() runs on MyPtcType1
{
setverdict(fail);
}
// SA/PA should recognize this function and make a error
function fn_ptc_verdict_error() runs on MyPtcType1
{
var integer i;
}
function fn_ptc_verdict_inconc() runs on MyPtcType1
{
setverdict(inconc);
}
function fn_ptc_verdict_none() runs on MyPtcType1
{
setverdict(none);
}
function fn_ptc_verdict_passpass() runs on MyPtcType1
{
setverdict(pass);
setverdict(pass);
}
function fn_ptc_verdict_passfail() runs on MyPtcType1
{
setverdict(pass);
setverdict(fail);
}
function fn_ptc_verdict_passinconc() runs on MyPtcType1
{
setverdict(pass);
setverdict(inconc);
}
function fn_ptc_verdict_passnone() runs on MyPtcType1
{
setverdict(pass);
setverdict(none);
}
function fn_ptc_verdict_inconcpass() runs on MyPtcType1
{
setverdict(inconc);
setverdict(pass);
}
function fn_ptc_verdict_inconcfail() runs on MyPtcType1
{
setverdict(inconc);
setverdict(fail);
}
function fn_ptc_verdict_inconcinconc() runs on MyPtcType1
{
setverdict(inconc);
setverdict(inconc);
stop;
}
function fn_ptc_verdict_inconcnone() runs on MyPtcType1
{
setverdict(inconc);
setverdict(none);
}
function fn_ptc_verdict_failpass() runs on MyPtcType1
{
setverdict(fail);
setverdict(pass);
}
function fn_ptc_verdict_failfail() runs on MyPtcType1
{
setverdict(fail);
setverdict(fail);
}
function fn_ptc_verdict_failinconc() runs on MyPtcType1
{
setverdict(fail);
setverdict(inconc);
}
function fn_ptc_verdict_failnone() runs on MyPtcType1
{
setverdict(fail)
setverdict(none);
}
type component MyPTCType2
{
}
function fn_ptc2_verdict_pass() runs on MyPTCType2
{
setverdict(pass);
}
function fn_ptc2_verdict_fail() runs on MyPTCType2
{
setverdict(fail);
}
function fn_ptc2_verdict_inconc() runs on MyPTCType2
{
setverdict(inconc);
}
function fn_ptc2_verdict_none() runs on MyPTCType2
{
setverdict(none);
}
//Verdict operation test for single PTC in a testcase
testcase tc_ptc_verdict_get() runs on MyMtcType
{
var MyPtcType1 ptc1;
ptc1 := MyPtcType1.create;
ptc1.start(fn_ptc_verdict_get());
ptc1.done; // ETHRGE
}
testcase tc_ptc_verdict_pass() runs on MyMtcType
{
var MyPtcType1 ptc1;
ptc1 := MyPtcType1.create;
ptc1.start(fn_ptc_verdict_pass());
ptc1.done; // ETHRGE
}
testcase tc_ptc_verdict_fail() runs on MyMtcType
{
var MyPtcType1 ptc1;
ptc1 := MyPtcType1.create;
ptc1.start(fn_ptc_verdict_fail());
ptc1.done; // ETHRGE
}
testcase tc_ptc_verdict_inconc() runs on MyMtcType
{
var MyPtcType1 ptc1;
ptc1 := MyPtcType1.create;
ptc1.start(fn_ptc_verdict_inconc());
ptc1.done; // ETHRGE
}
testcase tc_ptc_verdict_none() runs on MyMtcType
{
var MyPtcType1 ptc1;
ptc1 := MyPtcType1.create;
ptc1.start(fn_ptc_verdict_none());
ptc1.done; // ETHRGE
}
testcase tc_ptc_verdict_error() runs on MyMtcType
{
var MyPtcType1 ptc1;
ptc1 := MyPtcType1.create;
ptc1.start(fn_ptc_verdict_error());
ptc1.done; // ETHRGE
}
testcase tc_ptc_verdict_passpass() runs on MyMtcType
{
var MyPtcType1 ptc1;
ptc1 := MyPtcType1.create;
ptc1.start(fn_ptc_verdict_passpass());
ptc1.done; // ETHRGE
}
testcase tc_ptc_verdict_passfail() runs on MyMtcType
{
var MyPtcType1 ptc1;
ptc1 := MyPtcType1.create;
ptc1.start(fn_ptc_verdict_passfail());
ptc1.done; // ETHRGE
}
testcase tc_ptc_verdict_passinconc() runs on MyMtcType
{
var MyPtcType1 ptc1;
ptc1 := MyPtcType1.create;
ptc1.start(fn_ptc_verdict_passinconc());
ptc1.done; // ETHRGE
}
testcase tc_ptc_verdict_passnone() runs on MyMtcType
{
var MyPtcType1 ptc1;
ptc1 := MyPtcType1.create;
ptc1.start(fn_ptc_verdict_passnone());
ptc1.done; // ETHRGE
}
testcase tc_ptc_verdict_failpass() runs on MyMtcType
{
var MyPtcType1 ptc1;
ptc1 := MyPtcType1.create;
ptc1.start(fn_ptc_verdict_failpass());
ptc1.done; // ETHRGE
}
testcase tc_ptc_verdict_failfail() runs on MyMtcType
{
var MyPtcType1 ptc1;
ptc1 := MyPtcType1.create;
ptc1.start(fn_ptc_verdict_failfail());
ptc1.done; // ETHRGE
}
testcase tc_ptc_verdict_failinconc() runs on MyMtcType
{
var MyPtcType1 ptc1;
ptc1 := MyPtcType1.create;
ptc1.start(fn_ptc_verdict_failinconc());
ptc1.done; // ETHRGE
}
testcase tc_ptc_verdict_failnone() runs on MyMtcType
{
var MyPtcType1 ptc1;
ptc1 := MyPtcType1.create;
ptc1.start(fn_ptc_verdict_failnone());
ptc1.done; // ETHRGE
}
//Verdict operation test for two PTCs in a testcase
testcase tc_ptc2_verdict_passpass() runs on MyMtcType
{
var MyPtcType1 ptc1;
var MyPTCType2 ptc2;
ptc1 := MyPtcType1.create;
ptc2 := MyPTCType2.create;
ptc1.start(fn_ptc_verdict_pass());
ptc2.start(fn_ptc2_verdict_pass());
ptc1.done; // ETHRGE
ptc2.done; // ETHRGE
}
testcase tc_ptc2_verdict_passfail() runs on MyMtcType
{
var MyPtcType1 ptc1;
var MyPTCType2 ptc2;
ptc1 := MyPtcType1.create;
ptc2 := MyPTCType2.create;
ptc1.start(fn_ptc_verdict_pass());
ptc2.start(fn_ptc2_verdict_fail());
ptc1.done; // ETHRGE
ptc2.done; // ETHRGE
}
testcase tc_ptc2_verdict_passinconc() runs on MyMtcType
{
var MyPtcType1 ptc1;
var MyPTCType2 ptc2;
ptc1 := MyPtcType1.create;
ptc2 := MyPTCType2.create;
ptc1.start(fn_ptc_verdict_pass());
ptc2.start(fn_ptc2_verdict_inconc());
ptc1.done; // ETHRGE
ptc2.done; // ETHRGE
}
testcase tc_ptc2_verdict_passnone() runs on MyMtcType
{
var MyPtcType1 ptc1;
var MyPTCType2 ptc2;
ptc1 := MyPtcType1.create;
ptc2 := MyPTCType2.create;
ptc1.start(fn_ptc_verdict_pass());
ptc2.start(fn_ptc2_verdict_none());
ptc1.done; // ETHRGE
ptc2.done; // ETHRGE
}
testcase tc_ptc2_verdict_failfail() runs on MyMtcType
{
var MyPtcType1 ptc1;
var MyPTCType2 ptc2;
ptc1 := MyPtcType1.create;
ptc2 := MyPTCType2.create;
ptc1.start(fn_ptc_verdict_fail());
ptc2.start(fn_ptc2_verdict_fail());
ptc1.done; // ETHRGE
ptc2.done; // ETHRGE
}
testcase tc_ptc2_verdict_failinconc() runs on MyMtcType
{
var MyPtcType1 ptc1;
var MyPTCType2 ptc2;
ptc1 := MyPtcType1.create;
ptc2 := MyPTCType2.create;
ptc1.start(fn_ptc_verdict_fail());
ptc2.start(fn_ptc2_verdict_inconc());
ptc1.done; // ETHRGE
ptc2.done; // ETHRGE
}
testcase tc_ptc2_verdict_failnone() runs on MyMtcType
{
var MyPtcType1 ptc1;
var MyPTCType2 ptc2;
ptc1 := MyPtcType1.create;
ptc2 := MyPTCType2.create;
ptc1.start(fn_ptc_verdict_fail());
ptc2.start(fn_ptc2_verdict_none());
ptc1.done; // ETHRGE
ptc2.done; // ETHRGE
}
testcase tc_ptc2_verdict_inconcinconc() runs on MyMtcType
{
var MyPtcType1 ptc1;
var MyPTCType2 ptc2;
ptc1 := MyPtcType1.create;
ptc2 := MyPTCType2.create;
ptc1.start(fn_ptc_verdict_inconc());
ptc2.start(fn_ptc2_verdict_inconc());
ptc1.done; // ETHRGE
ptc2.done; // ETHRGE
}
testcase tc_ptc2_verdict_inconcnone() runs on MyMtcType
{
var MyPtcType1 ptc1;
var MyPTCType2 ptc2;
ptc1 := MyPtcType1.create;
ptc2 := MyPTCType2.create;
ptc1.start(fn_ptc_verdict_inconc());
ptc2.start(fn_ptc2_verdict_none());
ptc1.done; // ETHRGE
ptc2.done; // ETHRGE
}
testcase tc_ptc2_verdict_nonenone() runs on MyMtcType
{
var MyPtcType1 ptc1;
var MyPTCType2 ptc2;
ptc1 := MyPtcType1.create;
ptc2 := MyPTCType2.create;
ptc1.start(fn_ptc_verdict_none());
ptc2.start(fn_ptc2_verdict_none());
ptc1.done; // ETHRGE
ptc2.done; // ETHRGE
}
//Verdict operation test for two PTCs in a testcase with same PTC type
testcase tc_ptcd_verdict_passpass() runs on MyMtcType
{
var MyPtcType1 ptc1, ptc2;
ptc1 := MyPtcType1.create;
ptc2 := MyPtcType1.create;
ptc1.start(fn_ptc_verdict_pass());
ptc2.start(fn_ptc_verdict_pass());
ptc1.done; // ETHRGE
ptc2.done; // ETHRGE
}
testcase tc_ptcd_verdict_passfail() runs on MyMtcType
{
var MyPtcType1 ptc1, ptc2;
ptc1 := MyPtcType1.create;
ptc2 := MyPtcType1.create;
ptc1.start(fn_ptc_verdict_pass());
ptc2.start(fn_ptc_verdict_fail());
ptc1.done; // ETHRGE
ptc2.done; // ETHRGE
}
testcase tc_ptcd_verdict_passinconc() runs on MyMtcType
{
var MyPtcType1 ptc1, ptc2;
ptc1 := MyPtcType1.create;
ptc2 := MyPtcType1.create;
ptc1.start(fn_ptc_verdict_pass());
ptc2.start(fn_ptc_verdict_inconc());
ptc1.done; // ETHRGE
ptc2.done; // ETHRGE
}
testcase tc_ptcd_verdict_passnone() runs on MyMtcType
{
var MyPtcType1 ptc1, ptc2;
ptc1 := MyPtcType1.create;
ptc2 := MyPtcType1.create;
ptc1.start(fn_ptc_verdict_pass());
ptc2.start(fn_ptc_verdict_none());
ptc1.done; // ETHRGE
ptc2.done; // ETHRGE
}
testcase tc_ptcd_verdict_failfail() runs on MyMtcType
{
var MyPtcType1 ptc1, ptc2;
ptc1 := MyPtcType1.create;
ptc2 := MyPtcType1.create;
ptc1.start(fn_ptc_verdict_fail());
ptc2.start(fn_ptc_verdict_fail());
ptc1.done; // ETHRGE
ptc2.done; // ETHRGE
}
testcase tc_ptcd_verdict_failinconc() runs on MyMtcType
{
var MyPtcType1 ptc1;
var MyPTCType2 ptc2;
ptc1 := MyPtcType1.create;
ptc2 := MyPTCType2.create;
ptc1.start(fn_ptc_verdict_fail());
ptc2.start(fn_ptc2_verdict_inconc());
ptc1.done; // ETHRGE
ptc2.done; // ETHRGE
}
testcase tc_ptcd_verdict_failnone() runs on MyMtcType
{
var MyPtcType1 ptc1, ptc2;
ptc1 := MyPtcType1.create;
ptc2 := MyPtcType1.create;
ptc1.start(fn_ptc_verdict_fail());
ptc2.start(fn_ptc_verdict_none());
ptc1.done; // ETHRGE
ptc2.done; // ETHRGE
}
testcase tc_ptcd_verdict_inconcinconc() runs on MyMtcType
{
var MyPtcType1 ptc1, ptc2;
ptc1 := MyPtcType1.create;
ptc2 := MyPtcType1.create;
ptc1.start(fn_ptc_verdict_inconc());
ptc2.start(fn_ptc_verdict_inconc());
ptc1.done; // ETHRGE
ptc2.done; // ETHRGE
}
testcase tc_ptcd_verdict_inconcnone() runs on MyMtcType
{
var MyPtcType1 ptc1, ptc2;
ptc1 := MyPtcType1.create;
ptc2 := MyPtcType1.create;
ptc1.start(fn_ptc_verdict_inconc());
ptc2.start(fn_ptc_verdict_none());
ptc1.done; // ETHRGE
ptc2.done; // ETHRGE
}
testcase tc_ptcd_verdict_nonenone() runs on MyMtcType
{
var MyPtcType1 ptc1, ptc2;
ptc1 := MyPtcType1.create;
ptc2 := MyPtcType1.create;
ptc1.start(fn_ptc_verdict_none());
ptc2.start(fn_ptc_verdict_none());
ptc1.done; // ETHRGE
ptc2.done; // ETHRGE
}
//to test many PTCs and component array
testcase tc_ptc_manyptcs() runs on MyMtcType
{
var MyPtcType1 ptc0,ptc1,ptc2,ptc3,ptc4;
var MyPTCType2 ptc5,ptc6,ptc7,ptc8,ptc9;
ptc0 := MyPtcType1.create;
ptc1 := MyPtcType1.create;
ptc2 := MyPtcType1.create;
ptc3 := MyPtcType1.create;
ptc4 := MyPtcType1.create;
ptc5 := MyPTCType2.create;
ptc6 := MyPTCType2.create;
ptc7 := MyPTCType2.create;
ptc8 := MyPTCType2.create;
ptc9 := MyPTCType2.create;
ptc0.start(fn_ptc_verdict_pass());
ptc1.start(fn_ptc_verdict_pass());
ptc2.start(fn_ptc_verdict_pass());
ptc3.start(fn_ptc_verdict_pass());
ptc4.start(fn_ptc_verdict_pass());
ptc5.start(fn_ptc2_verdict_pass());
ptc6.start(fn_ptc2_verdict_pass());
ptc7.start(fn_ptc2_verdict_pass());
ptc8.start(fn_ptc2_verdict_pass());
ptc9.start(fn_ptc2_verdict_pass());
ptc0.done; // ETHRGE
ptc1.done; // ETHRGE
ptc2.done; // ETHRGE
ptc3.done; // ETHRGE
ptc4.done; // ETHRGE
ptc5.done; // ETHRGE
ptc6.done; // ETHRGE
ptc7.done; // ETHRGE
ptc8.done; // ETHRGE
ptc9.done; // ETHRGE
}
testcase tc_ptc_ptcarray() runs on MyMtcType
{
var MyPtcType1 ptc[10];
/* ptc[0] := MyPtcType1.create;
ptc[1] := MyPtcType1.create;
ptc[2] := MyPtcType1.create;
ptc[3] := MyPtcType1.create;
ptc[4] := MyPtcType1.create;
ptc[5] := MyPtcType1.create;