ObjFW  Diff

Differences From Artifact [38c5330f76]:

To Artifact [e81e35af26]:


874
875
876
877
878
879
880
881

882
883
884
885


886
887
888
889
890


891
892
893

894



895
896
897
898
899
900
901
874
875
876
877
878
879
880

881
882
883
884

885
886
887
888
889


890
891
892
893
894
895

896
897
898
899
900
901
902
903
904
905







-
+



-
+
+



-
-
+
+



+
-
+
+
+








	/*
	 * These test numbers can be generated without rounding if we have IEEE
	 * floating point numbers, thus we can use == on them.
	 */
	TEST(@"-[floatValue]",
	    [C(@"\t-0.25 ") floatValue] == -0.25 &&
	    [C(@"\r\n\tINF\t\n") doubleValue] == INFINITY &&
	    [C(@"\r\n\tINF\t\n") floatValue] == INFINITY &&
	    [C(@"\r -INFINITY\n") floatValue] == -INFINITY &&
	    isnan([C(@"   NAN\t\t") floatValue]))

#if !defined(OF_ANDROID) && !defined(OF_SOLARIS) && !defined(OF_DJGPP)
#if !defined(OF_ANDROID) && !defined(OF_SOLARIS) && !defined(OF_DJGPP) && \
    !defined(OF_AMIGAOS3)
# 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)
/* Android, Solaris, DJGPP and AmigaOS3 do not accept 0x for strtod() */
# if (!defined(OF_SOLARIS) || !defined(OF_X86)) && !defined(OF_AMIGAOS3)
#  define INPUT @"\t-0.123456789 "
#  define EXPECTED -0.123456789
# else
/*
/* Solaris' strtod() has weird rounding on x86, but not on x86_64 */
 * Solaris' strtod() has weird rounding on x86, but not on x86_64/
 * AmigaOS 3 with libnix has weird rounding as well.
 */
#  define INPUT @"\t-0.125 "
#  define EXPECTED -0.125
# endif
#endif
	TEST(@"-[doubleValue]",
	    [INPUT doubleValue] == EXPECTED &&
	    [C(@"\r\n\tINF\t\n") doubleValue] == INFINITY &&