654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
|
* floating point numbers, thus we can use == on them.
*/
TEST(@"-[floatValue]",
[C(@"\t-0.25 ") floatValue] == -0.25 &&
[C(@"\r-INFINITY\n") floatValue] == -INFINITY &&
isnan([C(@" NAN\t\t") floatValue]))
#if !defined(__ANDROID__) && !defined(OF_SOLARIS) && !defined(__DJGPP__)
# define INPUT @"\t-0x1.FFFFFFFFFFFFFP-1020 "
# define EXPECTED -0x1.FFFFFFFFFFFFFP-1020
#else
/* Android, Solaris and DJGPP do not accept 0x for strtod() */
# if !defined(OF_SOLARIS) || !defined(OF_X86)
# define INPUT @"\t-0.123456789 "
# define EXPECTED -0.123456789
|
|
|
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
|
* floating point numbers, thus we can use == on them.
*/
TEST(@"-[floatValue]",
[C(@"\t-0.25 ") floatValue] == -0.25 &&
[C(@"\r-INFINITY\n") floatValue] == -INFINITY &&
isnan([C(@" NAN\t\t") floatValue]))
#if !defined(OF_ANDROID) && !defined(OF_SOLARIS) && !defined(OF_DJGPP)
# define INPUT @"\t-0x1.FFFFFFFFFFFFFP-1020 "
# define EXPECTED -0x1.FFFFFFFFFFFFFP-1020
#else
/* Android, Solaris and DJGPP do not accept 0x for strtod() */
# if !defined(OF_SOLARIS) || !defined(OF_X86)
# define INPUT @"\t-0.123456789 "
# define EXPECTED -0.123456789
|