| 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('mock_compiler.dart'); | 7 #import('mock_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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 testUnparseMember("external const factory Foo() = Bar<T>.baz;"); | 239 testUnparseMember("external const factory Foo() = Bar<T>.baz;"); |
| 240 testUnparseMember("external const factory Foo() = prefix.Bar;"); | 240 testUnparseMember("external const factory Foo() = prefix.Bar;"); |
| 241 testUnparseMember("external const factory Foo() = prefix.Bar.baz;"); | 241 testUnparseMember("external const factory Foo() = prefix.Bar.baz;"); |
| 242 testUnparseMember("external const factory Foo() = prefix.Bar<T>;"); | 242 testUnparseMember("external const factory Foo() = prefix.Bar<T>;"); |
| 243 testUnparseMember("external const factory Foo() = prefix.Bar<T>.baz;"); | 243 testUnparseMember("external const factory Foo() = prefix.Bar<T>.baz;"); |
| 244 } | 244 } |
| 245 | 245 |
| 246 testClassDeclarations() { | 246 testClassDeclarations() { |
| 247 testUnparseTopLevelWithMetadata('class Foo{}'); | 247 testUnparseTopLevelWithMetadata('class Foo{}'); |
| 248 testUnparseTopLevelWithMetadata('abstract class Foo{}'); | 248 testUnparseTopLevelWithMetadata('abstract class Foo{}'); |
| 249 testUnparseTopLevelWithMetadata('class Fisk{operator-(x){}}'); |
| 249 } | 250 } |
| 250 | 251 |
| 251 main() { | 252 main() { |
| 252 testSignedConstants(); | 253 testSignedConstants(); |
| 253 testGenericTypes(); | 254 testGenericTypes(); |
| 254 testForLoop(); | 255 testForLoop(); |
| 255 testEmptyList(); | 256 testEmptyList(); |
| 256 testClosure(); | 257 testClosure(); |
| 257 testIndexedOperatorDecl(); | 258 testIndexedOperatorDecl(); |
| 258 testNativeMethods(); | 259 testNativeMethods(); |
| 259 testPrefixIncrements(); | 260 testPrefixIncrements(); |
| 260 testConstModifier(); | 261 testConstModifier(); |
| 261 testSimpleObjectInstantiation(); | 262 testSimpleObjectInstantiation(); |
| 262 testLibraryName(); | 263 testLibraryName(); |
| 263 testImport(); | 264 testImport(); |
| 264 testExport(); | 265 testExport(); |
| 265 testPart(); | 266 testPart(); |
| 266 testPartOf(); | 267 testPartOf(); |
| 267 testCombinators(); | 268 testCombinators(); |
| 268 testRedirectingFactoryConstructors(); | 269 testRedirectingFactoryConstructors(); |
| 269 testClassDeclarations(); | 270 testClassDeclarations(); |
| 270 } | 271 } |
| OLD | NEW |