Commit fe23994b authored by BenceJanosSzabo's avatar BenceJanosSzabo
Browse files

Minor +-inf testcase fixes



Change-Id: I275d9bbcdfb72fda908016190d4434cc0d9b65ad
Signed-off-by: default avatarBenceJanosSzabo <bence.janos.szabo@ericsson.com>
parent a63ec075
......@@ -19,6 +19,7 @@
.* Raduly, Csaba
.* Szabados, Kristof
.* Szabo, Janos Zoltan – initial implementation
.* Szabo, Bence Janos
.* Szalai, Endre
.* Tatarka, Gabor
.*
......
......@@ -9,32 +9,37 @@
* Bence Janos Szabo
*
******************************************************************************/
module special_SE {
module special_OK {
const float err1 := infinity + infinity;
const float err2 := infinity + -infinity;
const float err3 := -infinity + -infinity;
const float result1 := infinity + infinity;
const float result2 := infinity + -infinity;
const float result3 := -infinity + -infinity;
const float err4 := infinity - infinity;
const float err5 := infinity - -infinity;
const float err6 := -infinity - -infinity;
const float result4 := infinity - infinity;
const float result5 := infinity - -infinity;
const float result6 := -infinity - -infinity;
const float err7 := infinity * infinity;
const float err8 := infinity * -infinity;
const float err9 := -infinity * -infinity;
const float result7 := infinity * infinity;
const float result8 := infinity * -infinity;
const float result9 := -infinity * -infinity;
const float err10 := infinity / infinity;
const float err11 := infinity / -infinity;
const float err12 := -infinity / -infinity;
const float result10 := infinity / infinity;
const float result11 := infinity / -infinity;
const float result12 := -infinity / -infinity;
const float err13 := not_a_number + 2.0;
const float err14 := not_a_number - 2.0;
const float err15 := not_a_number * 2.0;
const float err16 := not_a_number / 2.0;
const float err17 := not_a_number + infinity;
const float err18 := not_a_number + -infinity;
const float result13 := not_a_number + 2.0;
const float result14 := not_a_number - 2.0;
const float result15 := not_a_number * 2.0;
const float result16 := not_a_number / 2.0;
const float result17 := not_a_number + infinity;
const float result18 := not_a_number + -infinity;
const float result19 := infinity + not_a_number;
const float result20 := infinity - not_a_number;
const float result21 := infinity * not_a_number;
const float result22 := infinity / not_a_number;
function fun() {
var float f := 2.0;
......@@ -49,6 +54,8 @@ function fun() {
f2 := not_a_number / f;
f2 := f / not_a_number;
f2 := not_a_number / not_a_number;
}
......
......@@ -85,6 +85,10 @@ testcase tc_addition() runs on EmptyCT {
if (f != -infinity) {
setverdict(fail);
}
f := not_a_number + not_a_number;
if (f != not_a_number) {
setverdict(fail);
}
setverdict(pass);
}
......@@ -162,6 +166,10 @@ testcase tc_subtraction() runs on EmptyCT {
if (f != not_a_number) {
setverdict(fail);
}
f := not_a_number - not_a_number;
if (f != not_a_number) {
setverdict(fail);
}
setverdict(pass);
}
......@@ -248,6 +256,10 @@ testcase tc_multiplication() runs on EmptyCT {
if (f != infinity) {
setverdict(fail);
}
f := not_a_number * not_a_number;
if (f != not_a_number) {
setverdict(fail);
}
setverdict(pass);
}
......@@ -358,6 +370,10 @@ testcase tc_division() runs on EmptyCT {
if (f != not_a_number) {
setverdict(fail);
}
f := not_a_number / not_a_number;
if (f != not_a_number) {
setverdict(fail);
}
setverdict(pass);
}
......@@ -420,6 +436,10 @@ const float c_f36 := inf / inf;
const float c_f37 := -inf / inf;
const float c_f38 := -inf / -inf;
const float c_f39 := inf / -inf;
const float c_f40 := not_a_number + not_a_number;
const float c_f41 := not_a_number - not_a_number;
const float c_f42 := not_a_number * not_a_number;
const float c_f43 := not_a_number / not_a_number;
testcase tc_compile_time() runs on EmptyCT {
......@@ -552,6 +572,18 @@ testcase tc_compile_time() runs on EmptyCT {
if (c_f39 != not_a_number) {
setverdict(fail);
}
if (c_f40 != not_a_number) {
setverdict(fail);
}
if (c_f41 != not_a_number) {
setverdict(fail);
}
if (c_f42 != not_a_number) {
setverdict(fail);
}
if (c_f43 != not_a_number) {
setverdict(fail);
}
setverdict(pass);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment