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 Tests what happens when you multiply large integers in an integer context. 25 26 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 27 28 29 PASS foo(2147483647, 2147483646) is -2147483648 30 PASS foo(2147483647, 2147483646) is -2147483648 31 PASS foo(2147483647, 2147483646) is -2147483648 32 PASS foo(2147483647, 2147483646) is -2147483648 33 PASS foo(2147483647, 2147483646) is -2147483648 34 PASS foo(2147483647, 2147483646) is -2147483648 35 PASS foo(2147483647, 2147483646) is -2147483648 36 PASS foo(2147483647, 2147483646) is -2147483648 37 PASS foo(2147483647, 2147483646) is -2147483648 38 PASS foo(2147483647, 2147483646) is -2147483648 39 PASS foo(2147483647, 2147483646) is -2147483648 40 PASS foo(2147483647, 2147483646) is -2147483648 41 PASS foo(2147483647, 2147483646) is -2147483648 42 PASS foo(2147483647, 2147483646) is -2147483648 43 PASS foo(2147483647, 2147483646) is -2147483648 44 PASS foo(2147483647, 2147483646) is -2147483648 45 PASS foo(2147483647, 2147483646) is -2147483648 46 PASS foo(2147483647, 2147483646) is -2147483648 47 PASS foo(2147483647, 2147483646) is -2147483648 48 PASS foo(2147483647, 2147483646) is -2147483648 49 PASS foo(2147483647, 2147483646) is -2147483648 50 PASS foo(2147483647, 2147483646) is -2147483648 51 PASS foo(2147483647, 2147483646) is -2147483648 52 PASS foo(2147483647, 2147483646) is -2147483648 53 PASS foo(2147483647, 2147483646) is -2147483648 54 PASS foo(2147483647, 2147483646) is -2147483648 55 PASS foo(2147483647, 2147483646) is -2147483648 56 PASS foo(2147483647, 2147483646) is -2147483648 57 PASS foo(2147483647, 2147483646) is -2147483648 58 PASS foo(2147483647, 2147483646) is -2147483648 59 PASS foo(2147483647, 2147483646) is -2147483648 60 PASS foo(2147483647, 2147483646) is -2147483648 61 PASS foo(2147483647, 2147483646) is -2147483648 62 PASS foo(2147483647, 2147483646) is -2147483648 63 PASS foo(2147483647, 2147483646) is -2147483648 64 PASS foo(2147483647, 2147483646) is -2147483648 65 PASS foo(2147483647, 2147483646) is -2147483648 66 PASS foo(2147483647, 2147483646) is -2147483648 67 PASS foo(2147483647, 2147483646) is -2147483648 68 PASS foo(2147483647, 2147483646) is -2147483648 69 PASS foo(2147483647, 2147483646) is -2147483648 70 PASS foo(2147483647, 2147483646) is -2147483648 71 PASS foo(2147483647, 2147483646) is -2147483648 72 PASS foo(2147483647, 2147483646) is -2147483648 73 PASS foo(2147483647, 2147483646) is -2147483648 74 PASS foo(2147483647, 2147483646) is -2147483648 75 PASS foo(2147483647, 2147483646) is -2147483648 76 PASS foo(2147483647, 2147483646) is -2147483648 77 PASS foo(2147483647, 2147483646) is -2147483648 78 PASS foo(2147483647, 2147483646) is -2147483648 79 PASS foo(2147483647, 2147483646) is -2147483648 80 PASS foo(2147483647, 2147483646) is -2147483648 81 PASS foo(2147483647, 2147483646) is -2147483648 82 PASS foo(2147483647, 2147483646) is -2147483648 83 PASS foo(2147483647, 2147483646) is -2147483648 84 PASS foo(2147483647, 2147483646) is -2147483648 85 PASS foo(2147483647, 2147483646) is -2147483648 86 PASS foo(2147483647, 2147483646) is -2147483648 87 PASS foo(2147483647, 2147483646) is -2147483648 88 PASS foo(2147483647, 2147483646) is -2147483648 89 PASS foo(2147483647, 2147483646) is -2147483648 90 PASS foo(2147483647, 2147483646) is -2147483648 91 PASS foo(2147483647, 2147483646) is -2147483648 92 PASS foo(2147483647, 2147483646) is -2147483648 93 PASS foo(2147483647, 2147483646) is -2147483648 94 PASS foo(2147483647, 2147483646) is -2147483648 95 PASS foo(2147483647, 2147483646) is -2147483648 96 PASS foo(2147483647, 2147483646) is -2147483648 97 PASS foo(2147483647, 2147483646) is -2147483648 98 PASS foo(2147483647, 2147483646) is -2147483648 99 PASS foo(2147483647, 2147483646) is -2147483648 100 PASS foo(2147483647, 2147483646) is -2147483648 101 PASS foo(2147483647, 2147483646) is -2147483648 102 PASS foo(2147483647, 2147483646) is -2147483648 103 PASS foo(2147483647, 2147483646) is -2147483648 104 PASS foo(2147483647, 2147483646) is -2147483648 105 PASS foo(2147483647, 2147483646) is -2147483648 106 PASS foo(2147483647, 2147483646) is -2147483648 107 PASS foo(2147483647, 2147483646) is -2147483648 108 PASS foo(2147483647, 2147483646) is -2147483648 109 PASS foo(2147483647, 2147483646) is -2147483648 110 PASS foo(2147483647, 2147483646) is -2147483648 111 PASS foo(2147483647, 2147483646) is -2147483648 112 PASS foo(2147483647, 2147483646) is -2147483648 113 PASS foo(2147483647, 2147483646) is -2147483648 114 PASS foo(2147483647, 2147483646) is -2147483648 115 PASS foo(2147483647, 2147483646) is -2147483648 116 PASS foo(2147483647, 2147483646) is -2147483648 117 PASS foo(2147483647, 2147483646) is -2147483648 118 PASS foo(2147483647, 2147483646) is -2147483648 119 PASS foo(2147483647, 2147483646) is -2147483648 120 PASS foo(2147483647, 2147483646) is -2147483648 121 PASS foo(2147483647, 2147483646) is -2147483648 122 PASS foo(2147483647, 2147483646) is -2147483648 123 PASS foo(2147483647, 2147483646) is -2147483648 124 PASS foo(2147483647, 2147483646) is -2147483648 125 PASS foo(2147483647, 2147483646) is -2147483648 126 PASS foo(2147483647, 2147483646) is -2147483648 127 PASS foo(2147483647, 2147483646) is -2147483648 128 PASS foo(2147483647, 2147483646) is -2147483648 129 PASS successfullyParsed is true 130 131 TEST COMPLETE 132 133