OLD | NEW |
1 # Copyright 2011 the V8 project authors. All rights reserved. | 1 # Copyright 2011 the V8 project authors. All rights reserved. |
2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
4 # met: | 4 # met: |
5 # | 5 # |
6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 74 |
75 StrictTest("$name-set-set", """ | 75 StrictTest("$name-set-set", """ |
76 var o = {set $id1(v){}, set $id2(v){}}; | 76 var o = {set $id1(v){}, set $id2(v){}}; |
77 """, replacement, "accessor_get_set") | 77 """, replacement, "accessor_get_set") |
78 | 78 |
79 StrictTest("$name-nested-get", """ | 79 StrictTest("$name-nested-get", """ |
80 var o = {get $id1(){}, o: {get $id2(){} } }; | 80 var o = {get $id1(){}, o: {get $id2(){} } }; |
81 """, replacement, None) | 81 """, replacement, None) |
82 | 82 |
83 StrictTest("$name-nested-set", """ | 83 StrictTest("$name-nested-set", """ |
84 var o = {set $id1(){}, o: {set $id2(){} } }; | 84 var o = {set $id1(v){}, o: {set $id2(v){} } }; |
85 """, replacement, None) | 85 """, replacement, None) |
86 | 86 |
87 | 87 |
88 def TestBothWays(name, propa, propb, allow_strict = True): | 88 def TestBothWays(name, propa, propb, allow_strict = True): |
89 PropertyTest(name + "-1", propa, propb, allow_strict) | 89 PropertyTest(name + "-1", propa, propb, allow_strict) |
90 PropertyTest(name + "-2", propb, propa, allow_strict) | 90 PropertyTest(name + "-2", propb, propa, allow_strict) |
91 | 91 |
92 def TestSame(name, prop, allow_strict = True): | 92 def TestSame(name, prop, allow_strict = True): |
93 PropertyTest(name, prop, prop, allow_strict) | 93 PropertyTest(name, prop, prop, allow_strict) |
94 | 94 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 TestBothWays("rounding-down", "1.12512512512512452", "1.1251251251251244") | 153 TestBothWays("rounding-down", "1.12512512512512452", "1.1251251251251244") |
154 TestBothWays("rounding-up", "1.12512512512512453", "1.1251251251251246") | 154 TestBothWays("rounding-up", "1.12512512512512453", "1.1251251251251246") |
155 | 155 |
156 TestBothWays("hex-int-str", "0x20", '"32"') | 156 TestBothWays("hex-int-str", "0x20", '"32"') |
157 TestBothWays("dec-int-str", "32.00", '"32"') | 157 TestBothWays("dec-int-str", "32.00", '"32"') |
158 TestBothWays("exp-int-str", "3.2e1", '"32"') | 158 TestBothWays("exp-int-str", "3.2e1", '"32"') |
159 TestBothWays("overflow-inf-str", "1e2000", '"Infinity"') | 159 TestBothWays("overflow-inf-str", "1e2000", '"Infinity"') |
160 TestBothWays("underflow-0-str", "1e-2000", '"0"') | 160 TestBothWays("underflow-0-str", "1e-2000", '"0"') |
161 TestBothWays("non-canonical-literal-int-str", "1.0", '"1"') | 161 TestBothWays("non-canonical-literal-int-str", "1.0", '"1"') |
162 TestBothWays("non-canonical-literal-frac-str", "1.50", '"1.5"') | 162 TestBothWays("non-canonical-literal-frac-str", "1.50", '"1.5"') |
OLD | NEW |