-not_a_number can be assigned as value to float
Copy of titan.core#622 (closed)
Summary
-not_a_number can be assigned as value to float however, according to section 6.1.0, NOTE 2 of the TTCN-3 standard, this is not allowed.
Steps and/or TTCN-3 code to reproduce
Put this code into a module, compile, and run:
type component ct_empty{}
testcase special_float_values() runs on ct_empty{
const float cpi := infinity;
const float cmi := -infinity;
const float cnn := not_a_number;
const float cmnn := -not_a_number; //should cause an error, the rest should pass
log(cpi, cmi, cnn, cmnn);
setverdict(pass);
}
What is the current bug behavior?
Test passes
What is the expected correct behavior?
Test shall lead to error (maybe in compilation phase) due to the 4th value assignment.
Relevant logs and/or screenshots
Possible fixes
Titan version
8.1.0
Platform details (OS type and version)
Microsoft Windows 10 Enterprise 10.0.19042
/cc @aknappqwt