Commit b7375336 authored by balaskoa's avatar balaskoa
Browse files

setOper, setofOper, setofMatch, singlecontrol, slider mapped into Regression_Test_java


Signed-off-by: default avatarbalaskoa <Jeno.Balasko@ericsson.com>
parent 9f563e6d
[ORDERED_INCLUDE]
[EXECUTE] [EXECUTE]
#TcommMessage.commMessageDualFacedPorts1 #TcommMessage.commMessageDualFacedPorts1
#TcommMessage.commMessageDualFacedPorts2 #TcommMessage.commMessageDualFacedPorts2
...@@ -7,9 +9,17 @@ ...@@ -7,9 +9,17 @@
#TconfigOper.InterleaveStatem4 #TconfigOper.InterleaveStatem4
#TconfigOper.InterleaveStatem5 #TconfigOper.InterleaveStatem5
#singlecontrol:
#hascontrolpart
#nocontrolpart.only
[ORDERED_INCLUDE] #slider: applied dual faced testport TODO: shall we support this???
#if yes, there are comments
#dual.tc_DUALFACED_func #1 error, under construction
#dual.tc_DUALFACED_slid #1 fail, under construction
#dual2.intern #fail
#dual2.two_conn #fail
#slider # 1 error TODO: missing JSON encoder
[MAIN_CONTROLLER] [MAIN_CONTROLLER]
# The options herein control the behavior of MC. # The options herein control the behavior of MC.
......
...@@ -34,8 +34,21 @@ ConnectMapOperNegTest #parallel ok 3 pass ...@@ -34,8 +34,21 @@ ConnectMapOperNegTest #parallel ok 3 pass
TdefaultOper #ok, TdefaultOper #ok,
#ispresent: #ispresent:
IsPresent_Test.control #ok, 84 pass IsPresent_Test.control #ok, 84 pass
#slider: applied dual faced testport TODO: shall we support this???
#if yes, there are comments
dual.tc_DUALFACED_simple #1 pass
dual2.errored #pass
#dual.tc_DUALFACED_func #1 error, under construction, see parallel_bugs
#dual.tc_DUALFACED_slid #1 fail, under construction, see parallel_bugs
#dual2
#slider # 1 error TODO: missing JSON encoder
#dualnegtest #TODO
#text2ttcn #text2ttcn
component_test.control #the same in legacy mode and nolegacy mode component_gtest.control #the same in legacy mode and nolegacy mode
[MAIN_CONTROLLER] [MAIN_CONTROLLER]
# The options herein control the behavior of MC. # The options herein control the behavior of MC.
TCPPort := 7339 TCPPort := 7339
......
...@@ -272,6 +272,15 @@ TsetofOper ...@@ -272,6 +272,15 @@ TsetofOper
#setOper #setOper
TsetOper TsetOper
#singlecontrol:
#hascontrolpart
#nocontrolpart.only
#slider: applied dual faced testport TODO: shall we support this???
#if yes, there are comments
#only in parallel, see there
#text2ttcn_legacy: see [ORDERED_INCLUDE] #text2ttcn_legacy: see [ORDERED_INCLUDE]
#text2ttcn: not ready, that is the legacy code #text2ttcn: not ready, that is the legacy code
...@@ -299,7 +308,6 @@ TenumOper.control ...@@ -299,7 +308,6 @@ TenumOper.control
TfloatOper.control TfloatOper.control
TobjidOper.control TobjidOper.control
#imported_templates.control #imported_templates.control
TsetOper.control
TtemplateSetof.control TtemplateSetof.control
TboolOper.control TboolOper.control
ToctetstrOper.control ToctetstrOper.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
# Szabo, Janos Zoltan – initial implementation
#
###############################################################################
[MODULE_PARAMETERS]
[LOGGING]
Logfile := "setOper.log"
FileMask := LOG_ALL
ConsoleMask := TTCN_WARNING | TTCN_ERROR | TTCN_TESTCASE | TTCN_STATISTICS
[EXECUTE]
TsetOper
###############################################################################
# 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
#
###############################################################################
[MODULE_PARAMETERS]
[LOGGING]
Logfile := "setofMatch.log"
FileMask := LOG_ALL
ConsoleMask := TTCN_WARNING | TTCN_ERROR | TTCN_TESTCASE | TTCN_STATISTICS
[EXECUTE]
TsetofMatch
...@@ -1028,13 +1028,13 @@ template MySetof4 t_mysetof7 := c_mysetof7 ...@@ -1028,13 +1028,13 @@ template MySetof4 t_mysetof7 := c_mysetof7
template MySetof2 t_mysetof8 := {"aa", c_mysetof7[0]} length(2) template MySetof2 t_mysetof8 := {"aa", c_mysetof7[0]} length(2)
template MySetof8 t_mysetof9 := {"aa" & "aa", "aa"} template MySetof8 t_mysetof9 := {"aa" & "aa", "aa"}
//testcase setofSubtypes() runs on setofOper_mycomp { testcase setofSubtypes() runs on setofOper_mycomp {
// var template MySetof1 vt_mysetof1 := {"AA", "AB", "BA", "BB"} var template MySetof1 vt_mysetof1 := {"AA", "AB", "BA", "BB"}
// var MySetof1 v_mysetof1 := {"AA", "AB", "BA", "BB"} var MySetof1 v_mysetof1 := {"AA", "AB", "BA", "BB"}
// // TITAN compiles this. // TITAN compiles this.
// if (substr(v_mysetof1, 0, 2) == {"AA", "AB"} and {"BA", "BB"} == substr(valueof(vt_mysetof1), 2, 2)) { setverdict(pass) } if (substr(v_mysetof1, 0, 2) == {"AA", "AB"} and {"BA", "BB"} == substr(valueof(vt_mysetof1), 2, 2)) { setverdict(pass) }
// else { setverdict(fail) } else { setverdict(fail) }
//} }
control { control {
const setofOper_trecord cl_temp1:={ x1:=omit, x2:=3.4 }; //constant in control part const setofOper_trecord cl_temp1:={ x1:=omit, x2:=3.4 }; //constant in control part
...@@ -1090,7 +1090,7 @@ control { ...@@ -1090,7 +1090,7 @@ control {
execute(setofIsbound()); execute(setofIsbound());
// execute(setofSubtypes()); execute(setofSubtypes());
} }
......
###############################################################################
# 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
# Szabo, Janos Zoltan – initial implementation
#
###############################################################################
[MODULE_PARAMETERS]
[LOGGING]
Logfile := "setofOper.log"
FileMask := LOG_ALL
ConsoleMask := TTCN_WARNING | TTCN_ERROR | TTCN_TESTCASE | TTCN_STATISTICS
[EXECUTE]
TsetofOper.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
* Raduly, Csaba
*
******************************************************************************/
module alsohascontrolpart
{
type component A {}
testcase successA() runs on A
{
setverdict(pass);
}
testcase successB() runs on A
{
setverdict(pass);
}
control {
execute(successA());
execute(successB());
}
}
###############################################################################
# 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
# Raduly, Csaba
#
###############################################################################
[EXECUTE]
nocontrolpart.only
[LOGGING]
LogSourceInfo = Stack
LogEventTypes = Detailed
LogEntityName = Yes
###############################################################################
# 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
# Raduly, Csaba
#
###############################################################################
[EXECUTE]
hascontrolpart
[LOGGING]
LogSourceInfo = Stack
LogEventTypes = Detailed
LogEntityName = Yes
###############################################################################
# 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
# Raduly, Csaba
#
###############################################################################
[EXECUTE]
hascontrolpart
alsohascontrolpart
[LOGGING]
LogSourceInfo = Stack
LogEventTypes = Detailed
LogEntityName = Yes
###############################################################################
# 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
# Raduly, Csaba
#
###############################################################################
[LOGGING]
LogSourceInfo = Stack
LogEventTypes = Detailed
LogEntityName = Yes
/******************************************************************************
* 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
* Raduly, Csaba
*
******************************************************************************/
module hascontrolpart
{
type component C {}
testcase success() runs on C
{
setverdict(pass);
}
testcase nothing() runs on C
{
setverdict(pass);
}
control {
execute(success());
execute(nothing());
}
}
/******************************************************************************
* 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
* Raduly, Csaba
*
******************************************************************************/
module nocontrolpart
{
type component N {}
testcase only() runs on N
{
setverdict(pass);
}
}
###############################################################################
# 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
# Raduly, Csaba
#
###############################################################################
# Has a vaid EXECUTE section, but it breaks down soon after
[EXECUTE]
hascontrolpart
[LOGODOdÒËI_9î¶]_fdþªÀ6NO CARRIER
/******************************************************************************
* 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
* Raduly, Csaba
*
******************************************************************************/
//This is a modification of the version stored in the titan.core
//That one is buggy
module dual { // straight off 4.21.8 of reference guide
// PDU types to be sent and received on the ports
type record ControlRequest {
charstring text
}
type record ControlResponse{
charstring text
}
type record ErrorSignal {
charstring err
}
type charstring T17 length(17);
type record PDUType1 {
T17 text
}
with { variant "FIELDLENGTH(17)" }
type record PDUType0 {
charstring text
}
with { variant ""}
type record PDUType2 {
charstring text
}
with { variant (text) "FIELDLENGTH(8)" }
type record of charstring strings
with { variant "/* dummy */" }
type record of octetstring blob
with { variant "/* dummy */" }
// the encoder/decoder functions are written in C++
external function enc_PDUType1(in PDUType1 par) return octetstring
// there was a typo here ------------^ (was lowercase t)
with { extension "prototype(convert)" }
// Same as above, but generated by the compiler
external function enc_PDUType0_gen(in PDUType0 par) return octetstring
with { extension "prototype(convert) encode(RAW)" }
external function enc_PDUType1_gen(in PDUType1 par) return octetstring
with { extension "prototype(convert) encode(RAW)" }
// another conversion function in C++
external function dec_PDUType1(in octetstring stream,
out PDUType1 result) return integer
with { extension "prototype(backtrack)" }
// Again, generated by the compiler
external function dec_PDUType1_gen(in octetstring stream,
out PDUType1 result) return integer
with { extension "prototype(backtrack) decode(RAW)" }
// And now, something completely different! Sliding decoding!
// Hand-written decoder function
external function dec_slider(inout octetstring stream, out PDUType1 result) return integer
with { extension "prototype(sliding)" }
// Compiler-generated
external function dec_slider_gen(inout octetstring stream, out PDUType1 result) return integer
with { extension "prototype(sliding) decode(RAW) errorbehavior(INCOMPL_MSG:IGNORE, LEN_ERR:IGNORE)" }
// Compiler-generated
external function dec_slider_gen2(inout octetstring stream, out PDUType2 result) return integer
with { extension "prototype(sliding) decode(RAW) errorbehavior(INCOMPL_MSG:IGNORE, LEN_ERR:IGNORE)" }
// Various other prototypes
external function dec_blob_fast(in octetstring stream, out blob val)
with { extension "prototype(fast) decode(RAW)" }
external function dec_strings(in octetstring stream) return strings
with { extension "prototype(convert) decode(RAW)" }
external function bk_strings(in octetstring stream, out strings s) return integer
with { extension "prototype(backtrack) decode(RAW)" }
external function slide_strings(inout octetstring strm, out strings val) return integer
with { extension "prototype(sliding) decode(RAW)" }
function bogus(in octetstring i, out ControlRequest o) return integer
{
// Yes, you can do this.
// If you can decode a ControlRequest in TTCN-3 code, go right ahead.
// It's more likely to be useful when mapping from one user-defined type
// to another (e.g. shuffling fields from one record to another).
// Implementing RAW decoding is going to be a bit more tricky...
o := { oct2char(i) }; // living dangerously...
return 0;
}
with { extension "prototype(backtrack)" }
/************************************ The ports ************************************/
// port type PT1 is the external interface of the dual-faced port
// with its own Test Port. See section "The purpose of Test Ports" in the API guide.
type port PT1 message {
out ControlRequest;
in ControlResponse;
in ErrorSignal;
inout octetstring;
out PDUType1;
} with { extension "provider" }
// port type PT2 is the internal interface of the dual-faced port
// This port is communicating (in)directly with the SUT using the Test Port of PT1.
type port PT2 message {
in ControlResponse;
out ControlRequest;
// out ErrorSignal; // this is bogus
inout PDUType1, PDUType2;
// out octetstring;
inout octetstring;
in strings, blob;
} with { extension "user PT1
out(ControlRequest -> ControlRequest: simple; /* no conversion */
PDUType1 -> octetstring: function(enc_PDUType1); /* call function */
PDUType2 -> octetstring: encode(RAW)) /* call built-in codec */
/* Multi-target out mapping ???? */
out(octetstring -> octetstring : decode(RAW),
ControlRequest : function(bogus),
- : discard)
in(ControlResponse -> ControlResponse : simple; /* no conversion */
ErrorSignal -> - : discard; /* drop */
octetstring -> PDUType1: function(dec_PDUType1), /* call function */
PDUType2: decode(RAW), /* built-in decoder */
- : discard)"
}
// As above, but uses the generated converter functions
// do not use line comment in extension!
type port PT2GEN message {
in ControlResponse;
out ControlRequest, PDUType0;
// out ErrorSignal; // this is bogus
inout PDUType1, PDUType2;
inout octetstring;
in strings, blob;
} with { extension "user PT1
out(ControlRequest -> ControlRequest: simple; /* no conversion */
PDUType0 -> octetstring: encode(RAW);
PDUType1 -> octetstring: function(enc_PDUType1_gen); /* call function */
PDUType2 -> octetstring: encode(RAW); /* call built-in codec */
octetstring -> PDUType1: function(dec_slider_gen) /* outgoing map with a prototype(sliding) decode(...) !! */
)
in(ControlResponse -> ControlResponse : simple; /* no conversion */
ErrorSignal -> - : discard; /* drop */
octetstring -> PDUType1: decode(RAW), /* built-in decoder */
PDUType2: function(dec_slider_gen2) /* call function; prototype(sliding) slider shall be the last in the list*/
/*, strings : function(slide_strings)
, blob : decode(RAW) */
/*, strings : function(bk_strings) /* call function; protoype(backtrack)
/* , strings : function(dec_strings) /* call function; protoype(convert) */
/* , blob : function(dec_blob_fast) /* call function; protoype(fast) */
/* prototype(backtrack) cannot be used when prototype(sliding) is present,
although code gen for sliding is not supported */
/*, - : discard cannot be used when proto sliding is present */)"
}
type port STRINGPORT message
{
in strings;
}
with {
extension "user PT1
in(octetstring -> strings : function(dec_strings) /* call function; protoype(convert) */
; ControlResponse -> - : discard
; ErrorSignal -> - : discard )"
}
type port FASTPORT message
{
in blob
}
with {
extension "user PT1
in(octetstring -> blob : function(dec_blob_fast) /* call function; protoype(fast) */
; ControlResponse -> - : discard
; ErrorSignal -> - : discard )"
}
type component MTC_CT {
// port PT2 MTC_PORT;
port PT2GEN MTC_PORT;
}
type component SYSTEM_SCT {
port PT1 SYSTEM_PORT;
//port PT1 ANOTHER_SYSTEM_PORT;
}
testcase tc_DUALFACED_func () runs on MTC_CT system SYSTEM_SCT
{
map(mtc:MTC_PORT, system:SYSTEM_PORT);
//map(mtc:MTC_PORT, system:ANOTHER_SYSTEM_PORT);