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

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

Issue 1414913002: Introduce .isMalformed (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address review Created 5 years, 2 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
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 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 ClassElement clsA = compiler.coreLibrary.find("A"); 965 ClassElement clsA = compiler.coreLibrary.find("A");
966 ClassElement clsB = compiler.coreLibrary.find("B"); 966 ClassElement clsB = compiler.coreLibrary.find("B");
967 967
968 ConstructorElement forward = clsA.lookupConstructor("forward"); 968 ConstructorElement forward = clsA.lookupConstructor("forward");
969 ConstructorElement target = forward.effectiveTarget; 969 ConstructorElement target = forward.effectiveTarget;
970 Expect.isTrue(target.isPatch); 970 Expect.isTrue(target.isPatch);
971 Expect.equals("patchTarget", target.name); 971 Expect.equals("patchTarget", target.name);
972 972
973 ConstructorElement forwardTwo = clsA.lookupConstructor("forwardTwo"); 973 ConstructorElement forwardTwo = clsA.lookupConstructor("forwardTwo");
974 target = forwardTwo.effectiveTarget; 974 target = forwardTwo.effectiveTarget;
975 Expect.isFalse(forwardTwo.isErroneous); 975 Expect.isFalse(forwardTwo.isMalformed);
976 Expect.isFalse(target.isPatch); 976 Expect.isFalse(target.isPatch);
977 Expect.equals("originTarget", target.name); 977 Expect.equals("originTarget", target.name);
978 } 978 }
979 979
980 Future testTypecheckPatchedMembers() async { 980 Future testTypecheckPatchedMembers() async {
981 String originText = "external void method();"; 981 String originText = "external void method();";
982 String patchText = """ 982 String patchText = """
983 @patch void method() { 983 @patch void method() {
984 String s = 0; 984 String s = 0;
985 } 985 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 await testPatchNonFunction(); 1026 await testPatchNonFunction();
1027 1027
1028 await testPatchAndSelector(); 1028 await testPatchAndSelector();
1029 1029
1030 await testEffectiveTarget(); 1030 await testEffectiveTarget();
1031 1031
1032 await testAnalyzeAllInjectedMembers(); 1032 await testAnalyzeAllInjectedMembers();
1033 await testTypecheckPatchedMembers(); 1033 await testTypecheckPatchedMembers();
1034 }); 1034 });
1035 } 1035 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/universe/call_structure.dart ('k') | tests/compiler/dart2js/semantic_visitor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698