OLD | NEW |
(Empty) | |
| 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 |
| 24 This test checks that toString() round-trip on a function that has a array with
elision does not remove a comma. |
| 25 |
| 26 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
| 27 |
| 28 |
| 29 PASS typeof undefined is 'undefined' |
| 30 PASS f1().length is 1 |
| 31 PASS f1()[1-1] is undefined |
| 32 PASS unevalf(eval(unevalf(f1))) is unevalf(f1) |
| 33 PASS eval(unevalf(f1))().length is 1 |
| 34 PASS eval(unevalf(f1))()[1-1] is undefined |
| 35 PASS f2().length is 1 |
| 36 PASS f2()[1-1] is 1 |
| 37 PASS unevalf(eval(unevalf(f2))) is unevalf(f2) |
| 38 PASS eval(unevalf(f2))().length is 1 |
| 39 PASS eval(unevalf(f2))()[1-1] is 1 |
| 40 PASS f3().length is 1 |
| 41 PASS f3()[1-1] is 1 |
| 42 PASS unevalf(eval(unevalf(f3))) is unevalf(f3) |
| 43 PASS eval(unevalf(f3))().length is 1 |
| 44 PASS eval(unevalf(f3))()[1-1] is 1 |
| 45 PASS f4().length is 2 |
| 46 PASS f4()[2-1] is undefined |
| 47 PASS unevalf(eval(unevalf(f4))) is unevalf(f4) |
| 48 PASS eval(unevalf(f4))().length is 2 |
| 49 PASS eval(unevalf(f4))()[2-1] is undefined |
| 50 PASS f5().length is 3 |
| 51 PASS f5()[3-1] is undefined |
| 52 PASS unevalf(eval(unevalf(f5))) is unevalf(f5) |
| 53 PASS eval(unevalf(f5))().length is 3 |
| 54 PASS eval(unevalf(f5))()[3-1] is undefined |
| 55 PASS f6().length is 4 |
| 56 PASS f6()[4-1] is 4 |
| 57 PASS unevalf(eval(unevalf(f6))) is unevalf(f6) |
| 58 PASS eval(unevalf(f6))().length is 4 |
| 59 PASS eval(unevalf(f6))()[4-1] is 4 |
| 60 PASS f7().length is 2 |
| 61 PASS f7()[2-1] is 2 |
| 62 PASS unevalf(eval(unevalf(f7))) is unevalf(f7) |
| 63 PASS eval(unevalf(f7))().length is 2 |
| 64 PASS eval(unevalf(f7))()[2-1] is 2 |
| 65 PASS f8().length is 3 |
| 66 PASS f8()[3-1] is undefined |
| 67 PASS unevalf(eval(unevalf(f8))) is unevalf(f8) |
| 68 PASS eval(unevalf(f8))().length is 3 |
| 69 PASS eval(unevalf(f8))()[3-1] is undefined |
| 70 PASS f9().length is 5 |
| 71 PASS f9()[5-1] is 5 |
| 72 PASS unevalf(eval(unevalf(f9))) is unevalf(f9) |
| 73 PASS eval(unevalf(f9))().length is 5 |
| 74 PASS eval(unevalf(f9))()[5-1] is 5 |
| 75 PASS f10().length is 5 |
| 76 PASS f10()[5-1] is undefined |
| 77 PASS unevalf(eval(unevalf(f10))) is unevalf(f10) |
| 78 PASS eval(unevalf(f10))().length is 5 |
| 79 PASS eval(unevalf(f10))()[5-1] is undefined |
| 80 PASS f11().length is 6 |
| 81 PASS f11()[6-1] is 6 |
| 82 PASS unevalf(eval(unevalf(f11))) is unevalf(f11) |
| 83 PASS eval(unevalf(f11))().length is 6 |
| 84 PASS eval(unevalf(f11))()[6-1] is 6 |
| 85 PASS f12().length is 2 |
| 86 PASS f12()[2-1] is undefined |
| 87 PASS unevalf(eval(unevalf(f12))) is unevalf(f12) |
| 88 PASS eval(unevalf(f12))().length is 2 |
| 89 PASS eval(unevalf(f12))()[2-1] is undefined |
| 90 PASS f13().length is 2 |
| 91 PASS f13()[2-1] is undefined |
| 92 PASS unevalf(eval(unevalf(f13))) is unevalf(f13) |
| 93 PASS eval(unevalf(f13))().length is 2 |
| 94 PASS eval(unevalf(f13))()[2-1] is undefined |
| 95 PASS f14().length is 3 |
| 96 PASS f14()[3-1] is undefined |
| 97 PASS unevalf(eval(unevalf(f14))) is unevalf(f14) |
| 98 PASS eval(unevalf(f14))().length is 3 |
| 99 PASS eval(unevalf(f14))()[3-1] is undefined |
| 100 PASS f15().length is 2 |
| 101 PASS f15()[2-1] is undefined |
| 102 PASS unevalf(eval(unevalf(f15))) is unevalf(f15) |
| 103 PASS eval(unevalf(f15))().length is 2 |
| 104 PASS eval(unevalf(f15))()[2-1] is undefined |
| 105 PASS f16().length is 3 |
| 106 PASS f16()[3-1] is undefined |
| 107 PASS unevalf(eval(unevalf(f16))) is unevalf(f16) |
| 108 PASS eval(unevalf(f16))().length is 3 |
| 109 PASS eval(unevalf(f16))()[3-1] is undefined |
| 110 PASS successfullyParsed is true |
| 111 |
| 112 TEST COMPLETE |
| 113 |
OLD | NEW |