| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 import 'dart:_js_helper'; | 5 import 'dart:_js_helper'; |
| 6 | 6 |
| 7 // JavaScript reserved words: | 7 // JavaScript reserved words: |
| 8 // | 8 // |
| 9 // break | 9 // break |
| 10 // case | 10 // case |
| (...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1362 if (object.withValue) throw 'incorrect value in "withValue"'; | 1362 if (object.withValue) throw 'incorrect value in "withValue"'; |
| 1363 | 1363 |
| 1364 if (object.yieldValue == null) | 1364 if (object.yieldValue == null) |
| 1365 throw 'incorrect initialization of "yieldValue"'; | 1365 throw 'incorrect initialization of "yieldValue"'; |
| 1366 object.yieldValue = true; | 1366 object.yieldValue = true; |
| 1367 if (!object.yieldValue) throw 'incorrect value in "yieldValue"'; | 1367 if (!object.yieldValue) throw 'incorrect value in "yieldValue"'; |
| 1368 object.yieldValue = false; | 1368 object.yieldValue = false; |
| 1369 if (object.yieldValue) throw 'incorrect value in "yieldValue"'; | 1369 if (object.yieldValue) throw 'incorrect value in "yieldValue"'; |
| 1370 } | 1370 } |
| 1371 | 1371 |
| 1372 makeNativeClassWithOddNames() native; | 1372 NativeClassWithOddNames makeNativeClassWithOddNames() native; |
| 1373 | 1373 |
| 1374 setup() native """ | 1374 setup() native """ |
| 1375 function NativeClassWithOddNames() {} | 1375 function NativeClassWithOddNames() {} |
| 1376 makeNativeClassWithOddNames = function() { return new NativeClassWithOddNames; } | 1376 makeNativeClassWithOddNames = function() { return new NativeClassWithOddNames; } |
| 1377 """; | 1377 """; |
| 1378 | 1378 |
| 1379 main() { | 1379 main() { |
| 1380 setup(); | 1380 setup(); |
| 1381 var object = new NativeClassWithOddNames(); | 1381 var object = makeNativeClassWithOddNames(); |
| 1382 object.testMyFields(); | 1382 object.testMyFields(); |
| 1383 testObjectStronglyTyped(object); | 1383 testObjectStronglyTyped(object); |
| 1384 testObjectWeaklyTyped([object]); | 1384 testObjectWeaklyTyped([object]); |
| 1385 testObjectWeaklyTyped(['fisk']); | 1385 testObjectWeaklyTyped(['fisk']); |
| 1386 testObjectWeaklyTyped([new ClassWithOddNames()..testMyFields()]); | 1386 testObjectWeaklyTyped([new ClassWithOddNames()..testMyFields()]); |
| 1387 } | 1387 } |
| OLD | NEW |