Skip to content
Snippets Groups Projects
Commit f860c9d1 authored by Jeno Attila Balasko's avatar Jeno Attila Balasko Committed by Gerrit Code Review
Browse files

Merge "in newer version of the standard nans equal."

parents b36cb668 23a1f82c
No related branches found
No related tags found
No related merge requests found
......@@ -105,7 +105,7 @@ struct ttcn3float {
bool operator>(double d) const {
if (isnan(value)) {
return true; // TTCN-3 special: NaN is bigger than anything except NaN
return !isnan(d); // TTCN-3 special: NaN is bigger than anything except NaN
}
else if (isnan(d)) {
return false; // TTCN-3 special: NaN is bigger than anything except NaN
......
......@@ -429,7 +429,8 @@ testcase floatComparison() runs on floatOper_comptype {
var float NaN := not_a_number;
if (NaN != not_a_number) { setverdict(fail, __LINE__, ": not_a_number==not_a_number:NotOK") }
if (NaN < NaN) { setverdict(fail, __LINE__, ": not_a_number<not_a_number:NotOK") }
if (NaN > NaN) { setverdict(fail, __LINE__, ": not_a_number<not_a_number:NotOK") }
}
testcase constFloatComparison() runs on floatOper_comptype {
......@@ -476,7 +477,8 @@ testcase constFloatComparison() runs on floatOper_comptype {
const float NaN := not_a_number;
if (NaN != not_a_number) { setverdict(fail, __LINE__, ": not_a_number==not_a_number:NotOK") }
if (NaN < NaN) { setverdict(fail, __LINE__, ": not_a_number<not_a_number:NotOK") }
if (NaN > NaN) { setverdict(fail, __LINE__, ": not_a_number<not_a_number:NotOK") }
}
control {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment