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

Side by Side Diff: tests/compiler/dart2js/js_model/model_test.dart

Issue 2969993002: Handle instance/super methods in js_model/model_test (Closed)
Patch Set: Created 3 years, 5 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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:async_helper/async_helper.dart'; 6 import 'package:async_helper/async_helper.dart';
7 import 'package:compiler/src/commandline_options.dart'; 7 import 'package:compiler/src/commandline_options.dart';
8 import 'package:compiler/src/common.dart'; 8 import 'package:compiler/src/common.dart';
9 import 'package:compiler/src/compiler.dart'; 9 import 'package:compiler/src/compiler.dart';
10 import 'package:compiler/src/kernel/kernel_backend_strategy.dart'; 10 import 'package:compiler/src/kernel/kernel_backend_strategy.dart';
11 import 'package:compiler/src/js_model/js_strategy.dart'; 11 import 'package:compiler/src/js_model/js_strategy.dart';
12 import 'package:expect/expect.dart'; 12 import 'package:expect/expect.dart';
13 import '../kernel/compiler_helper.dart'; 13 import '../kernel/compiler_helper.dart';
14 import '../serialization/helper.dart'; 14 import '../serialization/helper.dart';
15 15
16 const Map<String, String> SOURCE = const <String, String>{ 16 const Map<String, String> SOURCE = const <String, String>{
17 'main.dart': r''' 17 'main.dart': r'''
18 foo({named}) => 1; 18 foo({named}) => 1;
19 bar(a) => !a; 19 bar(a) => !a;
20 class Class {
21 var field;
22
23 Class();
24 Class.named(this.field);
25
26 method() {}
27 }
28
29 class SubClass extends Class {
30 method() {
31 super.method();
32 }
33 }
20 34
21 main() { 35 main() {
22 foo(); 36 foo();
23 bar(true); 37 bar(true);
24 []; 38 [];
25 {}; 39 {};
26 new Object(); 40 new Object();
41 new Class.named('');
42 new SubClass().method();
27 } 43 }
28 ''' 44 '''
29 }; 45 };
30 46
31 main(List<String> args) { 47 main(List<String> args) {
32 useJsStrategyForTesting = true; 48 useJsStrategyForTesting = true;
33 asyncTest(() async { 49 asyncTest(() async {
34 await mainInternal(args); 50 await mainInternal(args);
35 }); 51 });
36 } 52 }
(...skipping 14 matching lines...) Expand all
51 enableDebugMode(); 67 enableDebugMode();
52 68
53 Compiler compiler1 = await compileWithDill(entryPoint, memorySourceFiles, [ 69 Compiler compiler1 = await compileWithDill(entryPoint, memorySourceFiles, [
54 Flags.disableInlining, 70 Flags.disableInlining,
55 Flags.disableTypeInference 71 Flags.disableTypeInference
56 ], beforeRun: (Compiler compiler) { 72 ], beforeRun: (Compiler compiler) {
57 compiler.backendStrategy = new JsBackendStrategy(compiler); 73 compiler.backendStrategy = new JsBackendStrategy(compiler);
58 }, printSteps: true); 74 }, printSteps: true);
59 Expect.isFalse(compiler1.compilationFailed); 75 Expect.isFalse(compiler1.compilationFailed);
60 } 76 }
OLDNEW
« pkg/compiler/lib/src/world.dart ('K') | « pkg/compiler/lib/src/world.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698