Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: tests/compiler/dart2js/patch_test.dart

Issue 1768143003: Use specific messages for const constructor with body. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/dart_messages/lib/shared_messages.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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:async'; 5 import 'dart:async';
6 import 'package:expect/expect.dart'; 6 import 'package:expect/expect.dart';
7 import 'package:async_helper/async_helper.dart'; 7 import 'package:async_helper/async_helper.dart';
8 import 'package:compiler/src/compiler.dart'; 8 import 'package:compiler/src/compiler.dart';
9 import 'package:compiler/src/diagnostics/messages.dart' show 9 import 'package:compiler/src/diagnostics/messages.dart' show
10 MessageKind; 10 MessageKind;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 Expect.isNotNull(node.body); 50 Expect.isNotNull(node.body);
51 // If the element has a body it is either a Block or a Return statement, 51 // If the element has a body it is either a Block or a Return statement,
52 // both with different begin and end tokens. 52 // both with different begin and end tokens.
53 Expect.isTrue(node.body is Block || node.body is Return); 53 Expect.isTrue(node.body is Block || node.body is Return);
54 Expect.notEquals(node.body.getBeginToken(), node.body.getEndToken()); 54 Expect.notEquals(node.body.getBeginToken(), node.body.getEndToken());
55 } 55 }
56 56
57 void expectHasNoBody(compiler, ElementX element) { 57 void expectHasNoBody(compiler, ElementX element) {
58 var node = element.parseNode(compiler.parsing); 58 var node = element.parseNode(compiler.parsing);
59 Expect.isNotNull(node, "Element isn't parseable, when a body was expected"); 59 Expect.isNotNull(node, "Element isn't parseable, when a body was expected");
60 Expect.isFalse(node.hasBody()); 60 Expect.isFalse(node.hasBody);
61 } 61 }
62 62
63 Element ensure(compiler, 63 Element ensure(compiler,
64 String name, 64 String name,
65 Element lookup(name), 65 Element lookup(name),
66 {bool expectIsPatched: false, 66 {bool expectIsPatched: false,
67 bool expectIsPatch: false, 67 bool expectIsPatch: false,
68 bool checkHasBody: false, 68 bool checkHasBody: false,
69 bool expectIsGetter: false, 69 bool expectIsGetter: false,
70 bool expectIsFound: true, 70 bool expectIsFound: true,
(...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 await testPatchNonFunction(); 1110 await testPatchNonFunction();
1111 1111
1112 await testPatchAndSelector(); 1112 await testPatchAndSelector();
1113 1113
1114 await testEffectiveTarget(); 1114 await testEffectiveTarget();
1115 1115
1116 await testAnalyzeAllInjectedMembers(); 1116 await testAnalyzeAllInjectedMembers();
1117 await testTypecheckPatchedMembers(); 1117 await testTypecheckPatchedMembers();
1118 }); 1118 });
1119 } 1119 }
OLDNEW
« no previous file with comments | « pkg/dart_messages/lib/shared_messages.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698