JavaScript Test - add testcases from bug 375793, by Jesse Ruderman

This commit is contained in:
bclary%bclary.com 2007-03-30 14:52:37 +00:00
Родитель 946a9fb051
Коммит 9c56a43f60
1 изменённых файлов: 24 добавлений и 1 удалений

Просмотреть файл

@ -20,7 +20,8 @@
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Contributor(s): christine@netscape.com
* Jesse Ruderman
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
@ -109,5 +110,27 @@ new TestCase( SECTION, "Boolean(new Date())", true, Boolean(new
new TestCase( SECTION, "Boolean(new Date(0))", true, Boolean(new Date(0)) );
new TestCase( SECTION, "Boolean(Math)", true, Boolean(Math) );
// bug 375793
new TestCase( SECTION,
"NaN ? true : false",
false,
(NaN ? true : false) );
new TestCase( SECTION,
"1000 % 0 ? true : false",
false,
(1000 % 0 ? true : false) );
new TestCase( SECTION,
"(function(a,b){ return a % b ? true : false })(1000, 0)",
false,
((function(a,b){ return a % b ? true : false })(1000, 0)) );
new TestCase( SECTION,
"(function(x) { return !(x) })(0/0)",
true,
((function(x) { return !(x) })(0/0)) );
new TestCase( SECTION,
"!(0/0)",
true,
(!(0/0)) );
test();