Commit 8b0a36c3 authored by Aron Simon's avatar Aron Simon
Browse files

feat(test): initial testset for testing fuzzy formal parameters



Change-Id: I8a2f5c5ab70ff5c31f93da8edabd7f89b988b6a0
Signed-off-by: default avatarAron Simon <aron.simon@sigmatechnology.se>
parent 5c784391
.*---------------------------------------------------------------------*
:h4. Fuzzy variable - as function formal parameter - from caller 1
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Fuzzy variable - as function formal parameter - from caller 1>
<EXECUTE>
<VERDICT_LEAF PASS>
<MODULE TTCN Temp Temp.ttcn>
module Temp {
type component C { var integer CV_I := 0 } // CV_I component variable - integer
function F1() runs on C return integer { // for fuzzy
CV_I := CV_I + 1;
return CV_I;
}
function F2(in @fuzzy integer FFP_I) runs on C { // FFP_I formal fuzzy parameter - integer
action(FFP_I); // 1
action(FFP_I); // 2
action(FFP_I); // 3
}
testcase T() runs on C {
F2(F1());
setverdict(pass);
}
control
{
execute(T());
}
}
<END_MODULE>
<MODULE CFG Temp Temp.cfg>
[MODULE_PARAMETERS]
[LOGGING]
LogSourceInfo := Yes
Logfile := "Temp%i.log"
LogFileSize := 10
LogFileNumber := 10
DiskFullAction := error
FileMask := LOG_ALL
ConsoleMask := LOG_ALL | WARNING | ERROR | TESTCASE | STATISTICS
[EXECUTE]
Temp
<END_MODULE>
<RESULT IF_PASS COUNT 1>
Action: 1
<END_RESULT>
<RESULT IF_PASS COUNT 1>
Action: 2
<END_RESULT>
<RESULT IF_PASS COUNT 1>
Action: 3
<END_RESULT>
<END_TC>
:exmp.
.*---------------------------------------------------------------------*
:h4. Fuzzy variable - as function formal parameter - from caller 2
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Fuzzy variable - as function formal parameter - from caller 2>
<EXECUTE>
<VERDICT_LEAF PASS>
<MODULE TTCN Temp Temp.ttcn>
module Temp {
type component C { var integer CV_I := 0 } // CV_I component variable - integer
function F1() runs on C return integer { // for fuzzy
CV_I := CV_I + 1;
return CV_I;
}
function F2(in @fuzzy integer FFP_I) runs on C { // FFP_I formal fuzzy parameter - integer
action(FFP_I); // 1
action(FFP_I); // 1
action(FFP_I); // 1
}
testcase T() runs on C {
F2(1);
setverdict(pass);
}
control
{
execute(T());
}
}
<END_MODULE>
<MODULE CFG Temp Temp.cfg>
[MODULE_PARAMETERS]
[LOGGING]
LogSourceInfo := Yes
Logfile := "Temp%i.log"
LogFileSize := 10
LogFileNumber := 10
DiskFullAction := error
FileMask := LOG_ALL
ConsoleMask := LOG_ALL | WARNING | ERROR | TESTCASE | STATISTICS
[EXECUTE]
Temp
<END_MODULE>
<RESULT IF_PASS COUNT 3>
Action: 1
<END_RESULT>
<END_TC>
:exmp.
. // FIXME
..*---------------------------------------------------------------------*
.:h4. Fuzzy variable - as function formal parameter - from default parameter 1
..*---------------------------------------------------------------------*
.:xmp tab=0.
.
.<TC - Fuzzy variable - as function formal parameter - from default parameter 1>
.<EXECUTE>
.<VERDICT_LEAF PASS>
.<MODULE TTCN Temp Temp.ttcn>
.module Temp {
.
. type component C { var integer CV_I := 0 } // CV_I component variable - integer
.
. function F1() runs on C return integer { // for fuzzy
. CV_I := CV_I + 1;
. return CV_I;
. }
.
. function F2(in @fuzzy integer FFP_I := F1()) runs on C { // FFP_I formal fuzzy parameter - integer
. action(FFP_I); // 1
. action(FFP_I); // 2
. action(FFP_I); // 3
. }
.
. testcase T() runs on C {
. F2();
. setverdict(pass);
. }
.
.control
.{
. execute(T());
.}
.}
.<END_MODULE>
.<MODULE CFG Temp Temp.cfg>
.[MODULE_PARAMETERS]
.[LOGGING]
.LogSourceInfo := Yes
.Logfile := "Temp%i.log"
.LogFileSize := 10
.LogFileNumber := 10
.DiskFullAction := error
.FileMask := LOG_ALL
.ConsoleMask := LOG_ALL | WARNING | ERROR | TESTCASE | STATISTICS
.[EXECUTE]
.Temp
.<END_MODULE>
.<RESULT IF_PASS COUNT 1>
.Action: 1
.<END_RESULT>
.<RESULT IF_PASS COUNT 1>
.Action: 2
.<END_RESULT>
.<RESULT IF_PASS COUNT 1>
.Action: 3
.<END_RESULT>
.<END_TC>
.:exmp.
.*---------------------------------------------------------------------*
:h4. Fuzzy variable - as function formal parameter - from default parameter 2
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Fuzzy variable - as function formal parameter - from default parameter 2>
<EXECUTE>
<VERDICT_LEAF PASS>
<MODULE TTCN Temp Temp.ttcn>
module Temp {
type component C { var integer CV_I := 0 } // CV_I component variable - integer
function F1() runs on C return integer { // for fuzzy
CV_I := CV_I + 1;
return CV_I;
}
function F2(in @fuzzy integer FFP_I := 1) runs on C { // FFP_I formal fuzzy parameter - integer
action(FFP_I); // 1
action(FFP_I); // 1
action(FFP_I); // 1
}
testcase T() runs on C {
F2();
setverdict(pass);
}
control
{
execute(T());
}
}
<END_MODULE>
<MODULE CFG Temp Temp.cfg>
[MODULE_PARAMETERS]
[LOGGING]
LogSourceInfo := Yes
Logfile := "Temp%i.log"
LogFileSize := 10
LogFileNumber := 10
DiskFullAction := error
FileMask := LOG_ALL
ConsoleMask := LOG_ALL | WARNING | ERROR | TESTCASE | STATISTICS
[EXECUTE]
Temp
<END_MODULE>
<RESULT IF_PASS COUNT 3>
Action: 1
<END_RESULT>
<END_TC>
:exmp.
.*---------------------------------------------------------------------*
:h4. Fuzzy variable - as function formal parameter - override default parameter 1
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Fuzzy variable - as function formal parameter - override default parameter 1>
<EXECUTE>
<VERDICT_LEAF PASS>
<MODULE TTCN Temp Temp.ttcn>
module Temp {
type component C { var integer CV_I := 0 } // CV_I component variable - integer
function F1() runs on C return integer { // for fuzzy
CV_I := CV_I + 1;
return CV_I;
}
function F2(in @fuzzy integer FFP_I := 1) runs on C { // FFP_I formal fuzzy parameter - integer
action(FFP_I);
action(FFP_I);
action(FFP_I);
}
testcase T() runs on C {
F2(F1());
setverdict(pass);
}
control
{
execute(T());
}
}
<END_MODULE>
<MODULE CFG Temp Temp.cfg>
[MODULE_PARAMETERS]
[LOGGING]
LogSourceInfo := Yes
Logfile := "Temp%i.log"
LogFileSize := 10
LogFileNumber := 10
DiskFullAction := error
FileMask := LOG_ALL
ConsoleMask := LOG_ALL | WARNING | ERROR | TESTCASE | STATISTICS
[EXECUTE]
Temp
<END_MODULE>
<RESULT IF_PASS COUNT 1>
Action: 1
<END_RESULT>
<RESULT IF_PASS COUNT 1>
Action: 2
<END_RESULT>
<RESULT IF_PASS COUNT 1>
Action: 3
<END_RESULT>
<END_TC>
:exmp.
. // FIXME
..*---------------------------------------------------------------------*
.:h4. Fuzzy variable - as function formal parameter - override default parameter 2
..*---------------------------------------------------------------------*
.:xmp tab=0.
.
.<TC - Fuzzy variable - as function formal parameter - override default parameter 2>
.<EXECUTE>
.<VERDICT_LEAF PASS>
.<MODULE TTCN Temp Temp.ttcn>
.module Temp {
.
. type component C { var integer CV_I := 0 } // CV_I component variable - integer
.
. function F1() runs on C return integer { // for fuzzy
. CV_I := CV_I + 1;
. return CV_I;
. }
.
. function F2(in @fuzzy integer FFP_I := F1()) runs on C { // FFP_I formal fuzzy parameter - integer
. action(FFP_I);
. action(FFP_I);
. action(FFP_I);
. }
.
. testcase T() runs on C {
. F2(1);
. setverdict(pass);
. }
.
.control
.{
. execute(T());
.}
.}
.<END_MODULE>
.<MODULE CFG Temp Temp.cfg>
.[MODULE_PARAMETERS]
.[LOGGING]
.LogSourceInfo := Yes
.Logfile := "Temp%i.log"
.LogFileSize := 10
.LogFileNumber := 10
.DiskFullAction := error
.FileMask := LOG_ALL
.ConsoleMask := LOG_ALL | WARNING | ERROR | TESTCASE | STATISTICS
.[EXECUTE]
.Temp
.<END_MODULE>
.<RESULT IF_PASS COUNT 3>
.Action: 1
.<END_RESULT>
.<END_TC>
.:exmp.
. // FIXME
..*---------------------------------------------------------------------*
.:h4. Fuzzy variable - as testcase formal parameter - from caller 1
..*---------------------------------------------------------------------*
.:xmp tab=0.
.
.<TC - Fuzzy variable - as testcase formal parameter - from caller 1>
.<EXECUTE>
.<VERDICT_LEAF PASS>
.<MODULE TTCN Temp Temp.ttcn>
.module Temp {
.
. type component C { var integer CV_I := 0 } // CV_I component variable - integer
.
. function F() runs on C return integer { // for fuzzy
. CV_I := CV_I + 1;
. return CV_I;
. }
.
. testcase T(in @fuzzy integer FFP_I) runs on C { // FFP_I formal fuzzy parameter - integer
. action(FFP_I); // 1
. action(FFP_I); // 2
. action(FFP_I); // 3
. }
.
.control
.{
. execute(T(F()));
.}
.}
.<END_MODULE>
.<MODULE CFG Temp Temp.cfg>
.[MODULE_PARAMETERS]
.[LOGGING]
.LogSourceInfo := Yes
.Logfile := "Temp%i.log"
.LogFileSize := 10
.LogFileNumber := 10
.DiskFullAction := error
.FileMask := LOG_ALL
.ConsoleMask := LOG_ALL | WARNING | ERROR | TESTCASE | STATISTICS
.[EXECUTE]
.Temp
.<END_MODULE>
.<RESULT IF_PASS COUNT 1>
.Action: 1
.<END_RESULT>
.<RESULT IF_PASS COUNT 1>
.Action: 2
.<END_RESULT>
.<RESULT IF_PASS COUNT 1>
.Action: 3
.<END_RESULT>
.<END_TC>
.:exmp.
.*---------------------------------------------------------------------*
:h4. Fuzzy variable - as testcase formal parameter - from caller 2
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Fuzzy variable - as testcase formal parameter - from caller 2>
<EXECUTE>
<VERDICT_LEAF PASS>
<MODULE TTCN Temp Temp.ttcn>
module Temp {
type component C { var integer CV_I := 0 } // CV_I component variable - integer
function F() runs on C return integer { // for fuzzy
CV_I := CV_I + 1;
return CV_I;
}
testcase T(in @fuzzy integer FFP_I) runs on C { // FFP_I formal fuzzy parameter - integer
action(FFP_I); // 1
action(FFP_I); // 1
action(FFP_I); // 1
}
control
{
execute(T(1));
}
}
<END_MODULE>
<MODULE CFG Temp Temp.cfg>
[MODULE_PARAMETERS]
[LOGGING]
LogSourceInfo := Yes
Logfile := "Temp%i.log"
LogFileSize := 10
LogFileNumber := 10
DiskFullAction := error
FileMask := LOG_ALL
ConsoleMask := LOG_ALL | WARNING | ERROR | TESTCASE | STATISTICS
[EXECUTE]
Temp
<END_MODULE>
<RESULT IF_PASS COUNT 3>
Action: 1
<END_RESULT>
<END_TC>
:exmp.
. // FIXME
..*---------------------------------------------------------------------*
.:h4. Fuzzy variable - as testcase formal parameter - from default parameter 1
..*---------------------------------------------------------------------*
.:xmp tab=0.
.
.<TC - Fuzzy variable - as testcase formal parameter - from default parameter 1>
.<EXECUTE>
.<VERDICT_LEAF PASS>
.<MODULE TTCN Temp Temp.ttcn>
.module Temp {
.
. type component C { var integer CV_I := 0 } // CV_I component variable - integer
.
. function F() runs on C return integer { // for fuzzy
. CV_I := CV_I + 1;
. return CV_I;
. }
.
. testcase T(in @fuzzy integer FFP_I := F()) runs on C { // FFP_I formal fuzzy parameter - integer
. action(FFP_I); // 1
. action(FFP_I); // 2
. action(FFP_I); // 3
. }
.
.control
.{
. execute(T());
.}
.}
.<END_MODULE>
.<MODULE CFG Temp Temp.cfg>
.[MODULE_PARAMETERS]
.[LOGGING]
.LogSourceInfo := Yes
.Logfile := "Temp%i.log"
.LogFileSize := 10
.LogFileNumber := 10
.DiskFullAction := error
.FileMask := LOG_ALL
.ConsoleMask := LOG_ALL | WARNING | ERROR | TESTCASE | STATISTICS
.[EXECUTE]
.Temp
.<END_MODULE>
.<RESULT IF_PASS COUNT 1>
.Action: 1
.<END_RESULT>
.<RESULT IF_PASS COUNT 1>
.Action: 2
.<END_RESULT>
.<RESULT IF_PASS COUNT 1>
.Action: 3
.<END_RESULT>
.<END_TC>
.:exmp.
. // FIXME
..*---------------------------------------------------------------------*
.:h4. Fuzzy variable - as testcase formal parameter - from default parameter 2
..*---------------------------------------------------------------------*
.:xmp tab=0.
.
.<TC - Fuzzy variable - as testcase formal parameter - from default parameter 2>
.<EXECUTE>
.<VERDICT_LEAF PASS>
.<MODULE TTCN Temp Temp.ttcn>
.module Temp {
.
. type component C { var integer CV_I := 0 } // CV_I component variable - integer
.
. function F() runs on C return integer { // for fuzzy
. CV_I := CV_I + 1;
. return CV_I;
. }
.
. testcase T(in @fuzzy integer FFP_I := 1) runs on C { // FFP_I formal fuzzy parameter - integer
. action(FFP_I); // 1
. action(FFP_I); // 1
. action(FFP_I); // 1
. }
.
.control
.{
. execute(T());
.}
.}
.<END_MODULE>
.<MODULE CFG Temp Temp.cfg>
.[MODULE_PARAMETERS]
.[LOGGING]
.LogSourceInfo := Yes
.Logfile := "Temp%i.log"
.LogFileSize := 10
.LogFileNumber := 10
.DiskFullAction := error
.FileMask := LOG_ALL
.ConsoleMask := LOG_ALL | WARNING | ERROR | TESTCASE | STATISTICS
.[EXECUTE]
.Temp
.<END_MODULE>
.<RESULT IF_PASS COUNT 3>
.Action: 1
.<END_RESULT>
.<END_TC>
.:exmp.
. // FIXME
..*---------------------------------------------------------------------*
.:h4. Fuzzy variable - as testcase formal parameter - override default parameter 1
..*---------------------------------------------------------------------*
.:xmp tab=0.
.
.<TC - Fuzzy variable - as testcase formal parameter - override default parameter 1>
.<EXECUTE>
.<VERDICT_LEAF PASS>
.<MODULE TTCN Temp Temp.ttcn>
.module Temp {
.
. type component C { var integer CV_I := 0 } // CV_I component variable - integer
.
. function F() runs on C return integer { // for fuzzy
. CV_I := CV_I + 1;
. return CV_I;
. }
.
. testcase T(in @fuzzy integer FFP_I := 1) runs on C { // FFP_I formal fuzzy parameter - integer
. action(FFP_I);
. action(FFP_I);
. action(FFP_I);
. }
.
.control
.{
. execute(T(F()));
.}
.}
.<END_MODULE>
.<MODULE CFG Temp Temp.cfg>
.[MODULE_PARAMETERS]
.[LOGGING]
.LogSourceInfo := Yes
.Logfile := "Temp%i.log"
.LogFileSize := 10
.LogFileNumber := 10
.DiskFullAction := error
.FileMask := LOG_ALL
.ConsoleMask := LOG_ALL | WARNING | ERROR | TESTCASE | STATISTICS
.[EXECUTE]
.Temp
.<END_MODULE>
.<RESULT IF_PASS COUNT 1>
.Action: 1
.<END_RESULT>
.<RESULT IF_PASS COUNT 1>
.Action: 2
.<END_RESULT>
.<RESULT IF_PASS COUNT 1>
.Action: 3
.<END_RESULT>
.<END_TC>
.:exmp.
. // FIXME
..*---------------------------------------------------------------------*
.:h4. Fuzzy variable - as testcase formal parameter - override default parameter 2
..*---------------------------------------------------------------------*
.:xmp tab=0.
.
.<TC - Fuzzy variable - as testcase formal parameter - override default parameter 2>
.<EXECUTE>
.<VERDICT_LEAF PASS>
.<MODULE TTCN Temp Temp.ttcn>
.module Temp {
.
. type component C { var integer CV_I := 0 } // CV_I component variable - integer
.
. function F() runs on C return integer { // for fuzzy
. CV_I := CV_I + 1;
. return CV_I;
. }
.
. testcase T(in @fuzzy integer FFP_I := F()) runs on C { // FFP_I formal fuzzy parameter - integer
. action(FFP_I);
. action(FFP_I);
. action(FFP_I);
. }