| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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:uri'); | 5 #import('dart:uri'); |
| 6 #import('parser_helper.dart'); | 6 #import('parser_helper.dart'); |
| 7 #import("../../../lib/compiler/compiler.dart"); | 7 #import("../../../lib/compiler/compiler.dart"); |
| 8 #import("../../../lib/compiler/implementation/tree/tree.dart"); | 8 #import("../../../lib/compiler/implementation/tree/tree.dart"); |
| 9 | 9 |
| 10 testUnparse(String statement) { | 10 testUnparse(String statement) { |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 } | 83 } |
| 84 | 84 |
| 85 testNativeMethods() { | 85 testNativeMethods() { |
| 86 testUnparseMember('foo()native;'); | 86 testUnparseMember('foo()native;'); |
| 87 testUnparseMember('foo()native "bar";'); | 87 testUnparseMember('foo()native "bar";'); |
| 88 testUnparseMember('foo()native "this.x = 41";'); | 88 testUnparseMember('foo()native "this.x = 41";'); |
| 89 } | 89 } |
| 90 | 90 |
| 91 testSimpleFileUnparse() { | 91 testSimpleFileUnparse() { |
| 92 testDart2Dart('main() {}', (String s) { | 92 testDart2Dart('main() {}', (String s) { |
| 93 Expect.equals( |
| 94 '''main() { |
| 95 bailout_reason = "I can do nothing right now."; |
| 96 } |
| 97 ''', s); |
| 93 }); | 98 }); |
| 94 } | 99 } |
| 95 | 100 |
| 96 main() { | 101 main() { |
| 97 testGenericTypes(); | 102 testGenericTypes(); |
| 98 testForLoop(); | 103 testForLoop(); |
| 99 testEmptyList(); | 104 testEmptyList(); |
| 100 testClosure(); | 105 testClosure(); |
| 101 testIndexedOperatorDecl(); | 106 testIndexedOperatorDecl(); |
| 102 testNativeMethods(); | 107 testNativeMethods(); |
| 103 testSimpleFileUnparse(); | 108 testSimpleFileUnparse(); |
| 104 } | 109 } |
| OLD | NEW |