Annotation of embedaddon/php/Zend/tests/bug42143.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: bug #42143 (The constant NAN is reported as 0 on Windows build)
! 3: --CREDITS--
! 4: Venkat Raman Don
! 5: --FILE--
! 6: <?php
! 7: echo "Testing NAN:\n";
! 8: echo "NAN= ";
! 9: var_dump(NAN);
! 10: var_dump(tan(-1) == 123);
! 11: var_dump(cos(-100) == "PHP String");
! 12: var_dump(deg2rad(-5.6) == null);
! 13: var_dump(sqrt(-0.1) == false);
! 14: var_dump(sqrt(cos(M_PI)) == 0.1);
! 15: var_dump(NAN);
! 16: var_dump(is_nan(sqrt(-1.005)) == false);
! 17: var_dump(is_nan(floor(1)) == true);
! 18: var_dump(log10(-1) == log(-1));
! 19: var_dump(log10(-1) != log10(-1));
! 20: var_dump(is_finite(log10(-1)) == false);
! 21: var_dump(NAN == NAN);
! 22: ?>
! 23: --EXPECT--
! 24: Testing NAN:
! 25: NAN= float(NAN)
! 26: bool(false)
! 27: bool(false)
! 28: bool(false)
! 29: bool(false)
! 30: bool(false)
! 31: float(NAN)
! 32: bool(false)
! 33: bool(false)
! 34: bool(false)
! 35: bool(true)
! 36: bool(true)
! 37: bool(false)
! 38:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>