Commit 6bfe718e authored by kovacsa's avatar kovacsa
Browse files

Sem_predefined_functions_071

parent 6a623d4a
......@@ -29,11 +29,12 @@ module Sem_060101_TopLevel_007 {
if (match(v_a,"A") and
match(v_b,"ű") and
match(v_c,"A") and
match(v_d,"űA") ){
setverdict(pass,"v_a:",v_a,", v_b:",v_b,", v_c:",v_c,", v_d:",v_d);
match(v_d,"űA"))
{
setverdict(pass,"v_a:",v_a, "v_b:",v_b, "v_c:",v_c,"v_d:",v_d);
}
else {
setverdict(fail,"v_a:",v_a,", v_b:",v_b,", v_c:",v_c,", v_d:",v_d);
setverdict(fail,"v_a:",v_a, "v_b:",v_b, "v_c:",v_c,"v_d:",v_d);
}
}
......
/*****************************************************************
** @author STF 470
** @author STF 487
** @version 0.0.1
** @purpose 1:7.1.1, Ensure that arithmetic operators can not handle special float values
** @verdict pass reject
** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values
** @verdict pass accept, ttcn3verdict:pass
*****************************************************************/
module NegSem_070101_ArithmeticOperators_005 {
module Sem_070101_ArithmeticOperators_027 {
type component GeneralComp {
}
testcase TC_NegSem_070101_ArithmeticOperators_005() runs on GeneralComp {
testcase TC_Sem_070101_ArithmeticOperators_027() runs on GeneralComp {
var float v_i := infinity;
var float v_k :=2.0E0;
var float v_result := v_i * v_k; // arithmetic operator with infinity is not allowed
var float v_result := v_i + v_k; // "+" arithmetic operator with infinity
setverdict(pass);
if (v_result == infinity) { setverdict(pass,"match") }
else { setverdict(fail,v_result) }
}
control{
execute(TC_NegSem_070101_ArithmeticOperators_005());
execute(TC_Sem_070101_ArithmeticOperators_027());
}
}
/*****************************************************************
** @author STF 487
** @version 0.0.1
** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values
** @verdict pass accept, ttcn3verdict:pass
*****************************************************************/
module Sem_070101_ArithmeticOperators_028 {
type component GeneralComp {
}
testcase TC_Sem_070101_ArithmeticOperators_028() runs on GeneralComp {
var float v_i := infinity;
var float v_k :=2.0E0;
var float v_result := v_i - v_k; // "-" arithmetic operator with infinity
if (v_result == infinity) { setverdict(pass,"match") }
else { setverdict(fail,v_result) }
}
control{
execute(TC_Sem_070101_ArithmeticOperators_028());
}
}
/*****************************************************************
** @author STF 487
** @version 0.0.1
** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values
** @verdict pass accept, ttcn3verdict:pass
*****************************************************************/
module Sem_070101_ArithmeticOperators_029 {
type component GeneralComp {
}
testcase TC_Sem_070101_ArithmeticOperators_029() runs on GeneralComp {
var float v_i := infinity;
var float v_k :=2.0E0;
var float v_result := v_i * v_k; // "*" arithmetic operator with infinity
if (v_result == infinity) { setverdict(pass,"match") }
else { setverdict(fail,v_result) }
}
control{
execute(TC_Sem_070101_ArithmeticOperators_029());
}
}
/*****************************************************************
** @author STF 487
** @version 0.0.1
** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values
** @verdict pass accept, ttcn3verdict:pass
*****************************************************************/
module Sem_070101_ArithmeticOperators_030 {
type component GeneralComp {
}
testcase TC_Sem_070101_ArithmeticOperators_030() runs on GeneralComp {
var float v_i := infinity;
var float v_k :=2.0E0;
var float v_result := v_i / v_k; // "/" arithmetic operator with infinity
if (v_result == infinity) { setverdict(pass,"match") }
else { setverdict(fail,v_result) }
}
control{
execute(TC_Sem_070101_ArithmeticOperators_030());
}
}
/*****************************************************************
** @author STF 487
** @version 0.0.1
** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values
** @verdict pass accept, ttcn3verdict:pass
*****************************************************************/
module Sem_070101_ArithmeticOperators_031 {
type component GeneralComp {
}
testcase TC_Sem_070101_ArithmeticOperators_031() runs on GeneralComp {
var float v_i := -infinity;
var float v_k :=2.0E0;
var float v_result := v_i + v_k; // "+" arithmetic operator with -infinity
if (v_result == -infinity) { setverdict(pass,"match") }
else { setverdict(fail,v_result) }
}
control{
execute(TC_Sem_070101_ArithmeticOperators_031());
}
}
/*****************************************************************
** @author STF 487
** @version 0.0.1
** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values
** @verdict pass accept, ttcn3verdict:pass
*****************************************************************/
module Sem_070101_ArithmeticOperators_032 {
type component GeneralComp {
}
testcase TC_Sem_070101_ArithmeticOperators_032() runs on GeneralComp {
var float v_i := -infinity;
var float v_k :=2.0E0;
var float v_result := v_i - v_k; // "-" arithmetic operator with -infinity
if (v_result == -infinity) { setverdict(pass,"match") }
else { setverdict(fail, v_result) }
}
control{
execute(TC_Sem_070101_ArithmeticOperators_032());
}
}
/*****************************************************************
** @author STF 487
** @version 0.0.1
** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values
** @verdict pass accept, ttcn3verdict:pass
*****************************************************************/
module Sem_070101_ArithmeticOperators_033 {
type component GeneralComp {
}
testcase TC_Sem_070101_ArithmeticOperators_033() runs on GeneralComp {
var float v_i := -infinity;
var float v_k :=2.0E0;
var float v_result := v_i * v_k; // "*" arithmetic operator with -infinity
if (v_result == -infinity) { setverdict(pass,"match") }
else { setverdict(fail,v_result) }
}
control{
execute(TC_Sem_070101_ArithmeticOperators_033());
}
}
\ No newline at end of file
/*****************************************************************
** @author STF 487
** @version 0.0.1
** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values
** @verdict pass accept, ttcn3verdict:pass
*****************************************************************/
module Sem_070101_ArithmeticOperators_034 {
type component GeneralComp {
}
testcase TC_Sem_070101_ArithmeticOperators_034() runs on GeneralComp {
var float v_i := -infinity;
var float v_k :=2.0E0;
var float v_result := v_i / v_k; // "/" arithmetic operator with -infinity
if (v_result == -infinity) { setverdict(pass,"match") }
else { setverdict(fail,v_result) }
}
control{
execute(TC_Sem_070101_ArithmeticOperators_034());
}
}
/*****************************************************************
** @author STF 470
** @author STF 487
** @version 0.0.1
** @purpose 1:7.1.1, Ensure that arithmetic operators can not handle special float values
** @verdict pass reject
** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values
** @verdict pass accept, ttcn3verdict:pass
*****************************************************************/
module NegSem_070101_ArithmeticOperators_007 {
module Sem_070101_ArithmeticOperators_035 {
type component GeneralComp {
}
testcase TC_NegSem_070101_ArithmeticOperators_007() runs on GeneralComp {
testcase TC_Sem_070101_ArithmeticOperators_035() runs on GeneralComp {
var float v_i := not_a_number;
var float v_k :=2.0E0;
var float v_result := v_i * v_k; // arithmetic operator with NaN is not allowed
var float v_result := v_i + v_k; // "+" arithmetic operator with NaN
setverdict(pass);
if (v_result == not_a_number) { setverdict(pass,"match") }
else { setverdict(fail,v_result) }
}
control{
execute(TC_NegSem_070101_ArithmeticOperators_007());
execute(TC_Sem_070101_ArithmeticOperators_035());
}
}
/*****************************************************************
** @author STF 487
** @version 0.0.1
** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values
** @verdict pass accept, ttcn3verdict:pass
*****************************************************************/
module Sem_070101_ArithmeticOperators_036 {
type component GeneralComp {
}
testcase TC_Sem_070101_ArithmeticOperators_036() runs on GeneralComp {
var float v_i := not_a_number;
var float v_k :=2.0E0;
var float v_result := v_i - v_k; // "-" arithmetic operator with NaN
if (v_result == not_a_number) { setverdict(pass,"match") }
else { setverdict(fail,v_result) }
}
control{
execute(TC_Sem_070101_ArithmeticOperators_036());
}
}
/*****************************************************************
** @author STF 487
** @version 0.0.1
** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values
** @verdict pass accept, ttcn3verdict:pass
*****************************************************************/
module Sem_070101_ArithmeticOperators_037 {
type component GeneralComp {
}
testcase TC_Sem_070101_ArithmeticOperators_037() runs on GeneralComp {
var float v_i := not_a_number;
var float v_k :=2.0E0;
var float v_result := v_i * v_k; // "*" arithmetic operator with NaN
if (v_result == not_a_number) { setverdict(pass,"match") }
else { setverdict(fail,v_result) }
}
control{
execute(TC_Sem_070101_ArithmeticOperators_037());
}
}
/*****************************************************************
** @author STF 487
** @version 0.0.1
** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values
** @verdict pass accept, ttcn3verdict:pass
*****************************************************************/
module Sem_070101_ArithmeticOperators_038 {
type component GeneralComp {
}
testcase TC_Sem_070101_ArithmeticOperators_038() runs on GeneralComp {
var float v_i := not_a_number;
var float v_k :=2.0E0;
var float v_result := v_i / v_k; // "/" arithmetic operator with NaN
if (v_result == not_a_number) { setverdict(pass,"match") }
else { setverdict(fail,v_result) }
}
control{
execute(TC_Sem_070101_ArithmeticOperators_038());
}
}
/*****************************************************************
** @author STF 487
** @version 0.0.1
** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values
** @verdict pass accept, ttcn3verdict:pass
*****************************************************************/
module Sem_070101_ArithmeticOperators_039 {
type component GeneralComp {
}
testcase TC_Sem_070101_ArithmeticOperators_039() runs on GeneralComp {
var float v_i := infinity;
var float v_k :=2.0E0;
var float v_result := v_k / v_i; // Infinity special float as denominator
if (v_result == 0.0) { setverdict(pass,"match") }
else { setverdict(fail,v_result) }
}
control{
execute(TC_Sem_070101_ArithmeticOperators_039());
}
}
/*****************************************************************
** @author STF 487
** @version 0.0.1
** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values
** @verdict pass accept, ttcn3verdict:pass
*****************************************************************/
module Sem_070101_ArithmeticOperators_040 {
type component GeneralComp {
}
testcase TC_Sem_070101_ArithmeticOperators_040() runs on GeneralComp {
var float v_i := -infinity;
var float v_k :=2.0E0;
var float v_result := v_k / v_i; // -Infinity special float as denominator
if (v_result == 0.0) { setverdict(pass,"match") }
else { setverdict(fail,v_result) }
}
control{
execute(TC_Sem_070101_ArithmeticOperators_040());
}
}
/*****************************************************************
** @author STF 487
** @version 0.0.1
** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values
** @verdict pass accept, ttcn3verdict:pass
*****************************************************************/
module Sem_070101_ArithmeticOperators_041 {
type component GeneralComp {
}
testcase TC_Sem_070101_ArithmeticOperators_041() runs on GeneralComp {
var float v_i := not_a_number;
var float v_k :=2.0E0;
var float v_result := v_k / v_i; // NaN special float as denominator
if (v_result == not_a_number) { setverdict(pass,"match") }
else { setverdict(fail,v_result) }
}
control{
execute(TC_Sem_070101_ArithmeticOperators_041());
}
}
/*****************************************************************
** @author STF 487
** @version 0.0.1
** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values
** @verdict pass accept, ttcn3verdict:pass
*****************************************************************/
module Sem_070101_ArithmeticOperators_042 {
type component GeneralComp {
}
testcase TC_Sem_070101_ArithmeticOperators_042() runs on GeneralComp {
var float v_i := not_a_number;
var float v_k :=not_a_number;
var float v_result := v_k / v_i; // NaN special float as nominator and denominator
if (v_result == not_a_number) { setverdict(pass,"match") }
else { setverdict(fail,v_result) }
}
control{
execute(TC_Sem_070101_ArithmeticOperators_042());
}
}
/*****************************************************************
** @author STF 487
** @version 0.0.1
** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values
** @verdict pass accept, ttcn3verdict:pass
*****************************************************************/
module Sem_070101_ArithmeticOperators_043 {
type component GeneralComp {
}
testcase TC_Sem_070101_ArithmeticOperators_043() runs on GeneralComp {
var float v_i := infinity;
var float v_k := infinity;
var float v_result := v_k / v_i; // infinity special float as nominator and denominator
if (v_result == not_a_number) { setverdict(pass,"match") }
else { setverdict(fail,v_result) }
}
control{
execute(TC_Sem_070101_ArithmeticOperators_043());
}
}
/*****************************************************************
** @author STF 487
** @version 0.0.1
** @purpose 1:7.1.1, Ensure that arithmetic operators can handle special float values
** @verdict pass accept, ttcn3verdict:pass
*****************************************************************/
module Sem_070101_ArithmeticOperators_044 {
type component GeneralComp {
}
testcase TC_Sem_070101_ArithmeticOperators_044() runs on GeneralComp {
var float v_i := -infinity;