Extend the test of MonsterExtra (#5428)

* Extend the test of MonsterExtra

- Extend C++ test of MonsterExtra
- Add conversion of fbs/json NaNs to unsigned quiet-NaN
- Update documentation (cross-platform interoperability)

* Fix declaration of infinity constants int the test
This commit is contained in:
Vladimir Glavnyy
2019-07-09 01:22:56 +07:00
committed by Wouter van Oortmerssen
parent 47c7aa0361
commit e304f8c115
13 changed files with 654 additions and 409 deletions

View File

@@ -1,11 +1,15 @@
{
// Float-point values with NaN and Inf defaults.
testf_nan : nan,
testf_pinf : +inf,
testf_ninf : -inf,
testd_nan : nan,
testd_pinf : +inf,
testd_ninf : -inf,
testf_vec : [-1.0, 2.0, -inf, +inf, nan],
testd_vec : [-1.0, 4.0, -inf, +inf, nan]
// Initialize with non-default values.
d0 : -nan, // match with default
d1 : +inf,
d2 : -inf,
d3: nan,
f0 : +nan, // match with default
f1 : -nan, // match with default
f2 : +inf, // match with default
f3 : -inf, // match with default
// Values should have exact binary representation
// to avoid rounding effects in tests.
dvec : [2.0, +inf, -inf, nan,],
fvec : [1.0, -inf, +inf, nan],
}