• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2013 the V8 project authors. All rights reserved.
2# Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions
6# are met:
7# 1.  Redistributions of source code must retain the above copyright
8#     notice, this list of conditions and the following disclaimer.
9# 2.  Redistributions in binary form must reproduce the above copyright
10#     notice, this list of conditions and the following disclaimer in the
11#     documentation and/or other materials provided with the distribution.
12#
13# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
14# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
17# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
24KDE JS Test
25
26On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
27
28
29PASS h.charCodeAt(1) is 239
30PASS u.charCodeAt(1) is 4660
31PASS escape(h) is 'a%EFc'
32PASS escape(u) is 'a%u1234c'
33PASS escape(z) is '%00'
34PASS unescape(escape(h)) is h
35PASS unescape(escape(u)) is u
36PASS unescape(escape(z)) is z
37PASS isNaN(NaN) is true
38PASS isNaN('NaN') is true
39PASS isNaN('1') is false
40PASS isFinite(1) is true
41PASS isFinite('1') is true
42PASS isFinite('a') is false
43PASS isNaN(parseInt("Hello", 8)) is true
44PASS isNaN(parseInt("FFF", 10)) is true
45PASS isNaN(parseInt(".5", 10)) is true
46PASS isFinite(Infinity) is false
47PASS isFinite('Infinity') is false
48PASS isNaN(parseInt()) is true
49PASS isNaN(parseInt('')) is true
50PASS isNaN(parseInt(' ')) is true
51PASS isNaN(parseInt('a')) is true
52PASS parseInt(1) is 1
53PASS parseInt(1234567890123456) is 1234567890123456
54PASS parseInt(1.2) is 1
55PASS parseInt(' 2.3') is 2
56PASS parseInt('0x10') is 16
57PASS parseInt('11', 0) is 11
58PASS parseInt('F', 16) is 15
59PASS isNaN(parseInt('10', 40)) is true
60PASS parseInt('3x') is 3
61PASS parseInt('3 x') is 3
62PASS isNaN(parseInt('Infinity')) is true
63PASS parseInt("15") is 15
64PASS parseInt("015") is 15
65PASS parseInt("0xf") is 15
66PASS parseInt("15", 0) is 15
67PASS parseInt("15", 10) is 15
68PASS parseInt("F", 16) is 15
69PASS parseInt("17", 8) is 15
70PASS parseInt("15.99", 10) is 15
71PASS parseInt("FXX123", 16) is 15
72PASS parseInt("1111", 2) is 15
73PASS parseInt("15*3", 10) is 15
74PASS parseInt("0x7", 10) is 0
75PASS parseInt("1x7", 10) is 1
76PASS isNaN(parseFloat()) is true
77PASS isNaN(parseFloat('')) is true
78PASS isNaN(parseFloat(' ')) is true
79PASS isNaN(parseFloat('a')) is true
80PASS parseFloat(1) is 1
81PASS parseFloat(' 2.3') is 2.3
82PASS parseFloat('3.1 x', 3) is 3.1
83PASS parseFloat('3.1x', 3) is 3.1
84PASS isFinite(parseFloat('Infinity')) is false
85PASS delete NaN is false
86PASS delete Infinity is false
87PASS delete undefined is false
88PASS successfullyParsed is true
89
90TEST COMPLETE
91
92