| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // Test for named parameter with the name of a JavaScript property found on | 5 // Test for named parameter with the name of a JavaScript property found on |
| 6 // 'Object'. For such a NAME, foo.NAME may exist in an empty map, i.e. | 6 // 'Object'. For such a NAME, foo.NAME may exist in an empty map, i.e. |
| 7 // 'toString' in {} --> true. | 7 // 'toString' in {} --> true. |
| 8 | 8 |
| 9 | 9 |
| 10 main() { | 10 main() { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 test_toLocaleString(); | 23 test_toLocaleString(); |
| 24 test_toString(); | 24 test_toString(); |
| 25 test_unwatch(); | 25 test_unwatch(); |
| 26 test_valueOf(); | 26 test_valueOf(); |
| 27 test_watch(); | 27 test_watch(); |
| 28 } | 28 } |
| 29 | 29 |
| 30 // 'constructor' property. | 30 // 'constructor' property. |
| 31 | 31 |
| 32 class TestClass_constructor { | 32 class TestClass_constructor { |
| 33 method([constructor]) => constructor; | 33 method({constructor}) => constructor; |
| 34 static staticMethod([constructor]) => constructor; | 34 static staticMethod({constructor}) => constructor; |
| 35 } | 35 } |
| 36 globalMethod_constructor([constructor]) => constructor; | 36 globalMethod_constructor({constructor}) => constructor; |
| 37 | 37 |
| 38 test_constructor() { | 38 test_constructor() { |
| 39 var obj = new TestClass_constructor(); | 39 var obj = new TestClass_constructor(); |
| 40 | 40 |
| 41 Expect.equals(null, obj.method()); | 41 Expect.equals(null, obj.method()); |
| 42 Expect.equals(0, obj.method(constructor: 0)); | 42 Expect.equals(0, obj.method(constructor: 0)); |
| 43 | 43 |
| 44 Expect.equals(null, TestClass_constructor.staticMethod()); | 44 Expect.equals(null, TestClass_constructor.staticMethod()); |
| 45 Expect.equals(0, TestClass_constructor.staticMethod(constructor: 0)); | 45 Expect.equals(0, TestClass_constructor.staticMethod(constructor: 0)); |
| 46 | 46 |
| 47 Expect.equals(null, globalMethod_constructor()); | 47 Expect.equals(null, globalMethod_constructor()); |
| 48 Expect.equals(0, globalMethod_constructor(constructor: 0)); | 48 Expect.equals(0, globalMethod_constructor(constructor: 0)); |
| 49 } | 49 } |
| 50 | 50 |
| 51 // '__proto__' property. | 51 // '__proto__' property. |
| 52 | 52 |
| 53 class TestClass___proto__ { | 53 class TestClass___proto__ { |
| 54 method([__proto__]) => __proto__; | 54 method({__proto__}) => __proto__; |
| 55 static staticMethod([__proto__]) => __proto__; | 55 static staticMethod({__proto__}) => __proto__; |
| 56 } | 56 } |
| 57 globalMethod___proto__([__proto__]) => __proto__; | 57 globalMethod___proto__({__proto__}) => __proto__; |
| 58 | 58 |
| 59 test___proto__() { | 59 test___proto__() { |
| 60 var obj = new TestClass___proto__(); | 60 var obj = new TestClass___proto__(); |
| 61 | 61 |
| 62 Expect.equals(null, obj.method()); | 62 Expect.equals(null, obj.method()); |
| 63 Expect.equals(0, obj.method(__proto__: 0)); | 63 Expect.equals(0, obj.method(__proto__: 0)); |
| 64 | 64 |
| 65 Expect.equals(null, TestClass___proto__.staticMethod()); | 65 Expect.equals(null, TestClass___proto__.staticMethod()); |
| 66 Expect.equals(0, TestClass___proto__.staticMethod(__proto__: 0)); | 66 Expect.equals(0, TestClass___proto__.staticMethod(__proto__: 0)); |
| 67 | 67 |
| 68 Expect.equals(null, globalMethod___proto__()); | 68 Expect.equals(null, globalMethod___proto__()); |
| 69 Expect.equals(0, globalMethod___proto__(__proto__: 0)); | 69 Expect.equals(0, globalMethod___proto__(__proto__: 0)); |
| 70 } | 70 } |
| 71 | 71 |
| 72 // '__defineGetter__' property. | 72 // '__defineGetter__' property. |
| 73 | 73 |
| 74 class TestClass___defineGetter__ { | 74 class TestClass___defineGetter__ { |
| 75 method([__defineGetter__]) => __defineGetter__; | 75 method({__defineGetter__}) => __defineGetter__; |
| 76 static staticMethod([__defineGetter__]) => __defineGetter__; | 76 static staticMethod({__defineGetter__}) => __defineGetter__; |
| 77 } | 77 } |
| 78 globalMethod___defineGetter__([__defineGetter__]) => __defineGetter__; | 78 globalMethod___defineGetter__({__defineGetter__}) => __defineGetter__; |
| 79 | 79 |
| 80 test___defineGetter__() { | 80 test___defineGetter__() { |
| 81 var obj = new TestClass___defineGetter__(); | 81 var obj = new TestClass___defineGetter__(); |
| 82 | 82 |
| 83 Expect.equals(null, obj.method()); | 83 Expect.equals(null, obj.method()); |
| 84 Expect.equals(0, obj.method(__defineGetter__: 0)); | 84 Expect.equals(0, obj.method(__defineGetter__: 0)); |
| 85 | 85 |
| 86 Expect.equals(null, TestClass___defineGetter__.staticMethod()); | 86 Expect.equals(null, TestClass___defineGetter__.staticMethod()); |
| 87 Expect.equals(0, TestClass___defineGetter__.staticMethod(__defineGetter__: 0))
; | 87 Expect.equals(0, TestClass___defineGetter__.staticMethod(__defineGetter__: 0))
; |
| 88 | 88 |
| 89 Expect.equals(null, globalMethod___defineGetter__()); | 89 Expect.equals(null, globalMethod___defineGetter__()); |
| 90 Expect.equals(0, globalMethod___defineGetter__(__defineGetter__: 0)); | 90 Expect.equals(0, globalMethod___defineGetter__(__defineGetter__: 0)); |
| 91 } | 91 } |
| 92 | 92 |
| 93 // '__defineSetter__' property. | 93 // '__defineSetter__' property. |
| 94 | 94 |
| 95 class TestClass___defineSetter__ { | 95 class TestClass___defineSetter__ { |
| 96 method([__defineSetter__]) => __defineSetter__; | 96 method({__defineSetter__}) => __defineSetter__; |
| 97 static staticMethod([__defineSetter__]) => __defineSetter__; | 97 static staticMethod({__defineSetter__}) => __defineSetter__; |
| 98 } | 98 } |
| 99 globalMethod___defineSetter__([__defineSetter__]) => __defineSetter__; | 99 globalMethod___defineSetter__({__defineSetter__}) => __defineSetter__; |
| 100 | 100 |
| 101 test___defineSetter__() { | 101 test___defineSetter__() { |
| 102 var obj = new TestClass___defineSetter__(); | 102 var obj = new TestClass___defineSetter__(); |
| 103 | 103 |
| 104 Expect.equals(null, obj.method()); | 104 Expect.equals(null, obj.method()); |
| 105 Expect.equals(0, obj.method(__defineSetter__: 0)); | 105 Expect.equals(0, obj.method(__defineSetter__: 0)); |
| 106 | 106 |
| 107 Expect.equals(null, TestClass___defineSetter__.staticMethod()); | 107 Expect.equals(null, TestClass___defineSetter__.staticMethod()); |
| 108 Expect.equals(0, TestClass___defineSetter__.staticMethod(__defineSetter__: 0))
; | 108 Expect.equals(0, TestClass___defineSetter__.staticMethod(__defineSetter__: 0))
; |
| 109 | 109 |
| 110 Expect.equals(null, globalMethod___defineSetter__()); | 110 Expect.equals(null, globalMethod___defineSetter__()); |
| 111 Expect.equals(0, globalMethod___defineSetter__(__defineSetter__: 0)); | 111 Expect.equals(0, globalMethod___defineSetter__(__defineSetter__: 0)); |
| 112 } | 112 } |
| 113 | 113 |
| 114 // '__lookupGetter__' property. | 114 // '__lookupGetter__' property. |
| 115 | 115 |
| 116 class TestClass___lookupGetter__ { | 116 class TestClass___lookupGetter__ { |
| 117 method([__lookupGetter__]) => __lookupGetter__; | 117 method({__lookupGetter__}) => __lookupGetter__; |
| 118 static staticMethod([__lookupGetter__]) => __lookupGetter__; | 118 static staticMethod({__lookupGetter__}) => __lookupGetter__; |
| 119 } | 119 } |
| 120 globalMethod___lookupGetter__([__lookupGetter__]) => __lookupGetter__; | 120 globalMethod___lookupGetter__({__lookupGetter__}) => __lookupGetter__; |
| 121 | 121 |
| 122 test___lookupGetter__() { | 122 test___lookupGetter__() { |
| 123 var obj = new TestClass___lookupGetter__(); | 123 var obj = new TestClass___lookupGetter__(); |
| 124 | 124 |
| 125 Expect.equals(null, obj.method()); | 125 Expect.equals(null, obj.method()); |
| 126 Expect.equals(0, obj.method(__lookupGetter__: 0)); | 126 Expect.equals(0, obj.method(__lookupGetter__: 0)); |
| 127 | 127 |
| 128 Expect.equals(null, TestClass___lookupGetter__.staticMethod()); | 128 Expect.equals(null, TestClass___lookupGetter__.staticMethod()); |
| 129 Expect.equals(0, TestClass___lookupGetter__.staticMethod(__lookupGetter__: 0))
; | 129 Expect.equals(0, TestClass___lookupGetter__.staticMethod(__lookupGetter__: 0))
; |
| 130 | 130 |
| 131 Expect.equals(null, globalMethod___lookupGetter__()); | 131 Expect.equals(null, globalMethod___lookupGetter__()); |
| 132 Expect.equals(0, globalMethod___lookupGetter__(__lookupGetter__: 0)); | 132 Expect.equals(0, globalMethod___lookupGetter__(__lookupGetter__: 0)); |
| 133 } | 133 } |
| 134 | 134 |
| 135 // '__lookupSetter__' property. | 135 // '__lookupSetter__' property. |
| 136 | 136 |
| 137 class TestClass___lookupSetter__ { | 137 class TestClass___lookupSetter__ { |
| 138 method([__lookupSetter__]) => __lookupSetter__; | 138 method({__lookupSetter__}) => __lookupSetter__; |
| 139 static staticMethod([__lookupSetter__]) => __lookupSetter__; | 139 static staticMethod({__lookupSetter__}) => __lookupSetter__; |
| 140 } | 140 } |
| 141 globalMethod___lookupSetter__([__lookupSetter__]) => __lookupSetter__; | 141 globalMethod___lookupSetter__({__lookupSetter__}) => __lookupSetter__; |
| 142 | 142 |
| 143 test___lookupSetter__() { | 143 test___lookupSetter__() { |
| 144 var obj = new TestClass___lookupSetter__(); | 144 var obj = new TestClass___lookupSetter__(); |
| 145 | 145 |
| 146 Expect.equals(null, obj.method()); | 146 Expect.equals(null, obj.method()); |
| 147 Expect.equals(0, obj.method(__lookupSetter__: 0)); | 147 Expect.equals(0, obj.method(__lookupSetter__: 0)); |
| 148 | 148 |
| 149 Expect.equals(null, TestClass___lookupSetter__.staticMethod()); | 149 Expect.equals(null, TestClass___lookupSetter__.staticMethod()); |
| 150 Expect.equals(0, TestClass___lookupSetter__.staticMethod(__lookupSetter__: 0))
; | 150 Expect.equals(0, TestClass___lookupSetter__.staticMethod(__lookupSetter__: 0))
; |
| 151 | 151 |
| 152 Expect.equals(null, globalMethod___lookupSetter__()); | 152 Expect.equals(null, globalMethod___lookupSetter__()); |
| 153 Expect.equals(0, globalMethod___lookupSetter__(__lookupSetter__: 0)); | 153 Expect.equals(0, globalMethod___lookupSetter__(__lookupSetter__: 0)); |
| 154 } | 154 } |
| 155 | 155 |
| 156 // '__noSuchMethod__' property. | 156 // '__noSuchMethod__' property. |
| 157 | 157 |
| 158 class TestClass___noSuchMethod__ { | 158 class TestClass___noSuchMethod__ { |
| 159 method([__noSuchMethod__]) => __noSuchMethod__; | 159 method({__noSuchMethod__}) => __noSuchMethod__; |
| 160 static staticMethod([__noSuchMethod__]) => __noSuchMethod__; | 160 static staticMethod({__noSuchMethod__}) => __noSuchMethod__; |
| 161 } | 161 } |
| 162 globalMethod___noSuchMethod__([__noSuchMethod__]) => __noSuchMethod__; | 162 globalMethod___noSuchMethod__({__noSuchMethod__}) => __noSuchMethod__; |
| 163 | 163 |
| 164 test___noSuchMethod__() { | 164 test___noSuchMethod__() { |
| 165 var obj = new TestClass___noSuchMethod__(); | 165 var obj = new TestClass___noSuchMethod__(); |
| 166 | 166 |
| 167 Expect.equals(null, obj.method()); | 167 Expect.equals(null, obj.method()); |
| 168 Expect.equals(0, obj.method(__noSuchMethod__: 0)); | 168 Expect.equals(0, obj.method(__noSuchMethod__: 0)); |
| 169 | 169 |
| 170 Expect.equals(null, TestClass___noSuchMethod__.staticMethod()); | 170 Expect.equals(null, TestClass___noSuchMethod__.staticMethod()); |
| 171 Expect.equals(0, TestClass___noSuchMethod__.staticMethod(__noSuchMethod__: 0))
; | 171 Expect.equals(0, TestClass___noSuchMethod__.staticMethod(__noSuchMethod__: 0))
; |
| 172 | 172 |
| 173 Expect.equals(null, globalMethod___noSuchMethod__()); | 173 Expect.equals(null, globalMethod___noSuchMethod__()); |
| 174 Expect.equals(0, globalMethod___noSuchMethod__(__noSuchMethod__: 0)); | 174 Expect.equals(0, globalMethod___noSuchMethod__(__noSuchMethod__: 0)); |
| 175 } | 175 } |
| 176 | 176 |
| 177 // 'hasOwnProperty' property. | 177 // 'hasOwnProperty' property. |
| 178 | 178 |
| 179 class TestClass_hasOwnProperty { | 179 class TestClass_hasOwnProperty { |
| 180 method([hasOwnProperty]) => hasOwnProperty; | 180 method({hasOwnProperty}) => hasOwnProperty; |
| 181 static staticMethod([hasOwnProperty]) => hasOwnProperty; | 181 static staticMethod({hasOwnProperty}) => hasOwnProperty; |
| 182 } | 182 } |
| 183 globalMethod_hasOwnProperty([hasOwnProperty]) => hasOwnProperty; | 183 globalMethod_hasOwnProperty({hasOwnProperty}) => hasOwnProperty; |
| 184 | 184 |
| 185 test_hasOwnProperty() { | 185 test_hasOwnProperty() { |
| 186 var obj = new TestClass_hasOwnProperty(); | 186 var obj = new TestClass_hasOwnProperty(); |
| 187 | 187 |
| 188 Expect.equals(null, obj.method()); | 188 Expect.equals(null, obj.method()); |
| 189 Expect.equals(0, obj.method(hasOwnProperty: 0)); | 189 Expect.equals(0, obj.method(hasOwnProperty: 0)); |
| 190 | 190 |
| 191 Expect.equals(null, TestClass_hasOwnProperty.staticMethod()); | 191 Expect.equals(null, TestClass_hasOwnProperty.staticMethod()); |
| 192 Expect.equals(0, TestClass_hasOwnProperty.staticMethod(hasOwnProperty: 0)); | 192 Expect.equals(0, TestClass_hasOwnProperty.staticMethod(hasOwnProperty: 0)); |
| 193 | 193 |
| 194 Expect.equals(null, globalMethod_hasOwnProperty()); | 194 Expect.equals(null, globalMethod_hasOwnProperty()); |
| 195 Expect.equals(0, globalMethod_hasOwnProperty(hasOwnProperty: 0)); | 195 Expect.equals(0, globalMethod_hasOwnProperty(hasOwnProperty: 0)); |
| 196 } | 196 } |
| 197 | 197 |
| 198 // 'isPrototypeOf' property. | 198 // 'isPrototypeOf' property. |
| 199 | 199 |
| 200 class TestClass_isPrototypeOf { | 200 class TestClass_isPrototypeOf { |
| 201 method([isPrototypeOf]) => isPrototypeOf; | 201 method({isPrototypeOf}) => isPrototypeOf; |
| 202 static staticMethod([isPrototypeOf]) => isPrototypeOf; | 202 static staticMethod({isPrototypeOf}) => isPrototypeOf; |
| 203 } | 203 } |
| 204 globalMethod_isPrototypeOf([isPrototypeOf]) => isPrototypeOf; | 204 globalMethod_isPrototypeOf({isPrototypeOf}) => isPrototypeOf; |
| 205 | 205 |
| 206 test_isPrototypeOf() { | 206 test_isPrototypeOf() { |
| 207 var obj = new TestClass_isPrototypeOf(); | 207 var obj = new TestClass_isPrototypeOf(); |
| 208 | 208 |
| 209 Expect.equals(null, obj.method()); | 209 Expect.equals(null, obj.method()); |
| 210 Expect.equals(0, obj.method(isPrototypeOf: 0)); | 210 Expect.equals(0, obj.method(isPrototypeOf: 0)); |
| 211 | 211 |
| 212 Expect.equals(null, TestClass_isPrototypeOf.staticMethod()); | 212 Expect.equals(null, TestClass_isPrototypeOf.staticMethod()); |
| 213 Expect.equals(0, TestClass_isPrototypeOf.staticMethod(isPrototypeOf: 0)); | 213 Expect.equals(0, TestClass_isPrototypeOf.staticMethod(isPrototypeOf: 0)); |
| 214 | 214 |
| 215 Expect.equals(null, globalMethod_isPrototypeOf()); | 215 Expect.equals(null, globalMethod_isPrototypeOf()); |
| 216 Expect.equals(0, globalMethod_isPrototypeOf(isPrototypeOf: 0)); | 216 Expect.equals(0, globalMethod_isPrototypeOf(isPrototypeOf: 0)); |
| 217 } | 217 } |
| 218 | 218 |
| 219 // 'propertyIsEnumerable' property. | 219 // 'propertyIsEnumerable' property. |
| 220 | 220 |
| 221 class TestClass_propertyIsEnumerable { | 221 class TestClass_propertyIsEnumerable { |
| 222 method([propertyIsEnumerable]) => propertyIsEnumerable; | 222 method({propertyIsEnumerable}) => propertyIsEnumerable; |
| 223 static staticMethod([propertyIsEnumerable]) => propertyIsEnumerable; | 223 static staticMethod({propertyIsEnumerable}) => propertyIsEnumerable; |
| 224 } | 224 } |
| 225 globalMethod_propertyIsEnumerable([propertyIsEnumerable]) => propertyIsEnumerabl
e; | 225 globalMethod_propertyIsEnumerable({propertyIsEnumerable}) => propertyIsEnumerabl
e; |
| 226 | 226 |
| 227 test_propertyIsEnumerable() { | 227 test_propertyIsEnumerable() { |
| 228 var obj = new TestClass_propertyIsEnumerable(); | 228 var obj = new TestClass_propertyIsEnumerable(); |
| 229 | 229 |
| 230 Expect.equals(null, obj.method()); | 230 Expect.equals(null, obj.method()); |
| 231 Expect.equals(0, obj.method(propertyIsEnumerable: 0)); | 231 Expect.equals(0, obj.method(propertyIsEnumerable: 0)); |
| 232 | 232 |
| 233 Expect.equals(null, TestClass_propertyIsEnumerable.staticMethod()); | 233 Expect.equals(null, TestClass_propertyIsEnumerable.staticMethod()); |
| 234 Expect.equals(0, TestClass_propertyIsEnumerable.staticMethod(propertyIsEnumera
ble: 0)); | 234 Expect.equals(0, TestClass_propertyIsEnumerable.staticMethod(propertyIsEnumera
ble: 0)); |
| 235 | 235 |
| 236 Expect.equals(null, globalMethod_propertyIsEnumerable()); | 236 Expect.equals(null, globalMethod_propertyIsEnumerable()); |
| 237 Expect.equals(0, globalMethod_propertyIsEnumerable(propertyIsEnumerable: 0)); | 237 Expect.equals(0, globalMethod_propertyIsEnumerable(propertyIsEnumerable: 0)); |
| 238 } | 238 } |
| 239 | 239 |
| 240 // 'toSource' property. | 240 // 'toSource' property. |
| 241 | 241 |
| 242 class TestClass_toSource { | 242 class TestClass_toSource { |
| 243 method([toSource]) => toSource; | 243 method({toSource}) => toSource; |
| 244 static staticMethod([toSource]) => toSource; | 244 static staticMethod({toSource}) => toSource; |
| 245 } | 245 } |
| 246 globalMethod_toSource([toSource]) => toSource; | 246 globalMethod_toSource({toSource}) => toSource; |
| 247 | 247 |
| 248 test_toSource() { | 248 test_toSource() { |
| 249 var obj = new TestClass_toSource(); | 249 var obj = new TestClass_toSource(); |
| 250 | 250 |
| 251 Expect.equals(null, obj.method()); | 251 Expect.equals(null, obj.method()); |
| 252 Expect.equals(0, obj.method(toSource: 0)); | 252 Expect.equals(0, obj.method(toSource: 0)); |
| 253 | 253 |
| 254 Expect.equals(null, TestClass_toSource.staticMethod()); | 254 Expect.equals(null, TestClass_toSource.staticMethod()); |
| 255 Expect.equals(0, TestClass_toSource.staticMethod(toSource: 0)); | 255 Expect.equals(0, TestClass_toSource.staticMethod(toSource: 0)); |
| 256 | 256 |
| 257 Expect.equals(null, globalMethod_toSource()); | 257 Expect.equals(null, globalMethod_toSource()); |
| 258 Expect.equals(0, globalMethod_toSource(toSource: 0)); | 258 Expect.equals(0, globalMethod_toSource(toSource: 0)); |
| 259 } | 259 } |
| 260 | 260 |
| 261 // 'toLocaleString' property. | 261 // 'toLocaleString' property. |
| 262 | 262 |
| 263 class TestClass_toLocaleString { | 263 class TestClass_toLocaleString { |
| 264 method([toLocaleString]) => toLocaleString; | 264 method({toLocaleString}) => toLocaleString; |
| 265 static staticMethod([toLocaleString]) => toLocaleString; | 265 static staticMethod({toLocaleString}) => toLocaleString; |
| 266 } | 266 } |
| 267 globalMethod_toLocaleString([toLocaleString]) => toLocaleString; | 267 globalMethod_toLocaleString({toLocaleString}) => toLocaleString; |
| 268 | 268 |
| 269 test_toLocaleString() { | 269 test_toLocaleString() { |
| 270 var obj = new TestClass_toLocaleString(); | 270 var obj = new TestClass_toLocaleString(); |
| 271 | 271 |
| 272 Expect.equals(null, obj.method()); | 272 Expect.equals(null, obj.method()); |
| 273 Expect.equals(0, obj.method(toLocaleString: 0)); | 273 Expect.equals(0, obj.method(toLocaleString: 0)); |
| 274 | 274 |
| 275 Expect.equals(null, TestClass_toLocaleString.staticMethod()); | 275 Expect.equals(null, TestClass_toLocaleString.staticMethod()); |
| 276 Expect.equals(0, TestClass_toLocaleString.staticMethod(toLocaleString: 0)); | 276 Expect.equals(0, TestClass_toLocaleString.staticMethod(toLocaleString: 0)); |
| 277 | 277 |
| 278 Expect.equals(null, globalMethod_toLocaleString()); | 278 Expect.equals(null, globalMethod_toLocaleString()); |
| 279 Expect.equals(0, globalMethod_toLocaleString(toLocaleString: 0)); | 279 Expect.equals(0, globalMethod_toLocaleString(toLocaleString: 0)); |
| 280 } | 280 } |
| 281 | 281 |
| 282 // 'toString' property. | 282 // 'toString' property. |
| 283 | 283 |
| 284 class TestClass_toString { | 284 class TestClass_toString { |
| 285 method([toString]) => toString; | 285 method({toString}) => toString; |
| 286 static staticMethod([toString]) => toString; | 286 static staticMethod({toString}) => toString; |
| 287 } | 287 } |
| 288 globalMethod_toString([toString]) => toString; | 288 globalMethod_toString({toString}) => toString; |
| 289 | 289 |
| 290 test_toString() { | 290 test_toString() { |
| 291 var obj = new TestClass_toString(); | 291 var obj = new TestClass_toString(); |
| 292 | 292 |
| 293 Expect.equals(null, obj.method()); | 293 Expect.equals(null, obj.method()); |
| 294 Expect.equals(0, obj.method(toString: 0)); | 294 Expect.equals(0, obj.method(toString: 0)); |
| 295 | 295 |
| 296 Expect.equals(null, TestClass_toString.staticMethod()); | 296 Expect.equals(null, TestClass_toString.staticMethod()); |
| 297 Expect.equals(0, TestClass_toString.staticMethod(toString: 0)); | 297 Expect.equals(0, TestClass_toString.staticMethod(toString: 0)); |
| 298 | 298 |
| 299 Expect.equals(null, globalMethod_toString()); | 299 Expect.equals(null, globalMethod_toString()); |
| 300 Expect.equals(0, globalMethod_toString(toString: 0)); | 300 Expect.equals(0, globalMethod_toString(toString: 0)); |
| 301 } | 301 } |
| 302 | 302 |
| 303 // 'unwatch' property. | 303 // 'unwatch' property. |
| 304 | 304 |
| 305 class TestClass_unwatch { | 305 class TestClass_unwatch { |
| 306 method([unwatch]) => unwatch; | 306 method({unwatch}) => unwatch; |
| 307 static staticMethod([unwatch]) => unwatch; | 307 static staticMethod({unwatch}) => unwatch; |
| 308 } | 308 } |
| 309 globalMethod_unwatch([unwatch]) => unwatch; | 309 globalMethod_unwatch({unwatch}) => unwatch; |
| 310 | 310 |
| 311 test_unwatch() { | 311 test_unwatch() { |
| 312 var obj = new TestClass_unwatch(); | 312 var obj = new TestClass_unwatch(); |
| 313 | 313 |
| 314 Expect.equals(null, obj.method()); | 314 Expect.equals(null, obj.method()); |
| 315 Expect.equals(0, obj.method(unwatch: 0)); | 315 Expect.equals(0, obj.method(unwatch: 0)); |
| 316 | 316 |
| 317 Expect.equals(null, TestClass_unwatch.staticMethod()); | 317 Expect.equals(null, TestClass_unwatch.staticMethod()); |
| 318 Expect.equals(0, TestClass_unwatch.staticMethod(unwatch: 0)); | 318 Expect.equals(0, TestClass_unwatch.staticMethod(unwatch: 0)); |
| 319 | 319 |
| 320 Expect.equals(null, globalMethod_unwatch()); | 320 Expect.equals(null, globalMethod_unwatch()); |
| 321 Expect.equals(0, globalMethod_unwatch(unwatch: 0)); | 321 Expect.equals(0, globalMethod_unwatch(unwatch: 0)); |
| 322 } | 322 } |
| 323 | 323 |
| 324 // 'valueOf' property. | 324 // 'valueOf' property. |
| 325 | 325 |
| 326 class TestClass_valueOf { | 326 class TestClass_valueOf { |
| 327 method([valueOf]) => valueOf; | 327 method({valueOf}) => valueOf; |
| 328 static staticMethod([valueOf]) => valueOf; | 328 static staticMethod({valueOf}) => valueOf; |
| 329 } | 329 } |
| 330 globalMethod_valueOf([valueOf]) => valueOf; | 330 globalMethod_valueOf({valueOf}) => valueOf; |
| 331 | 331 |
| 332 test_valueOf() { | 332 test_valueOf() { |
| 333 var obj = new TestClass_valueOf(); | 333 var obj = new TestClass_valueOf(); |
| 334 | 334 |
| 335 Expect.equals(null, obj.method()); | 335 Expect.equals(null, obj.method()); |
| 336 Expect.equals(0, obj.method(valueOf: 0)); | 336 Expect.equals(0, obj.method(valueOf: 0)); |
| 337 | 337 |
| 338 Expect.equals(null, TestClass_valueOf.staticMethod()); | 338 Expect.equals(null, TestClass_valueOf.staticMethod()); |
| 339 Expect.equals(0, TestClass_valueOf.staticMethod(valueOf: 0)); | 339 Expect.equals(0, TestClass_valueOf.staticMethod(valueOf: 0)); |
| 340 | 340 |
| 341 Expect.equals(null, globalMethod_valueOf()); | 341 Expect.equals(null, globalMethod_valueOf()); |
| 342 Expect.equals(0, globalMethod_valueOf(valueOf: 0)); | 342 Expect.equals(0, globalMethod_valueOf(valueOf: 0)); |
| 343 } | 343 } |
| 344 | 344 |
| 345 // 'watch' property. | 345 // 'watch' property. |
| 346 | 346 |
| 347 class TestClass_watch { | 347 class TestClass_watch { |
| 348 method([watch]) => watch; | 348 method({watch}) => watch; |
| 349 static staticMethod([watch]) => watch; | 349 static staticMethod({watch}) => watch; |
| 350 } | 350 } |
| 351 globalMethod_watch([watch]) => watch; | 351 globalMethod_watch({watch}) => watch; |
| 352 | 352 |
| 353 test_watch() { | 353 test_watch() { |
| 354 var obj = new TestClass_watch(); | 354 var obj = new TestClass_watch(); |
| 355 | 355 |
| 356 Expect.equals(null, obj.method()); | 356 Expect.equals(null, obj.method()); |
| 357 Expect.equals(0, obj.method(watch: 0)); | 357 Expect.equals(0, obj.method(watch: 0)); |
| 358 | 358 |
| 359 Expect.equals(null, TestClass_watch.staticMethod()); | 359 Expect.equals(null, TestClass_watch.staticMethod()); |
| 360 Expect.equals(0, TestClass_watch.staticMethod(watch: 0)); | 360 Expect.equals(0, TestClass_watch.staticMethod(watch: 0)); |
| 361 | 361 |
| 362 Expect.equals(null, globalMethod_watch()); | 362 Expect.equals(null, globalMethod_watch()); |
| 363 Expect.equals(0, globalMethod_watch(watch: 0)); | 363 Expect.equals(0, globalMethod_watch(watch: 0)); |
| 364 } | 364 } |
| OLD | NEW |