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

Side by Side Diff: tests/compiler/dart2js/kernel/visitor_test.dart

Issue 2468273003: Fix kernel/visitor_test (Closed)
Patch Set: Fix impact_test after changes. Created 4 years, 1 month 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 | « tests/compiler/dart2js/kernel/impact_test.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 /// Test that the dart2js copy of [KernelVisitor] generates the expected IR as 5 /// Test that the dart2js copy of [KernelVisitor] generates the expected IR as
6 /// defined by kernel spec-mode test files. 6 /// defined by kernel spec-mode test files.
7 7
8 import 'dart:io'; 8 import 'dart:io';
9 import 'package:compiler/src/compiler.dart' show Compiler; 9 import 'package:compiler/src/compiler.dart' show Compiler;
10 import 'package:compiler/src/elements/elements.dart'; 10 import 'package:compiler/src/elements/elements.dart';
11 import 'package:compiler/src/js_backend/backend.dart' show JavaScriptBackend; 11 import 'package:compiler/src/js_backend/backend.dart' show JavaScriptBackend;
12 import 'package:compiler/src/commandline_options.dart' show Flags; 12 import 'package:compiler/src/commandline_options.dart' show Flags;
13 import 'package:kernel/ast.dart'; 13 import 'package:kernel/ast.dart';
14 import 'package:kernel/text/ast_to_text.dart'; 14 import 'package:kernel/text/ast_to_text.dart';
15 import 'package:kernel/transformations/mixin_full_resolution.dart'; 15 import 'package:kernel/transformations/mixin_full_resolution.dart';
16 import 'package:kernel/class_hierarchy.dart';
16 import 'package:path/path.dart' as pathlib; 17 import 'package:path/path.dart' as pathlib;
17 import 'package:test/test.dart'; 18 import 'package:test/test.dart';
18 19
19 import '../memory_compiler.dart'; 20 import '../memory_compiler.dart';
20 21
21 const String TESTCASE_DIR = 'third_party/pkg/kernel/testcases/'; 22 const String TESTCASE_DIR = 'third_party/pkg/kernel/testcases/';
22 23
23 const List<String> SKIP_TESTS = const <String>[]; 24 const List<String> SKIP_TESTS = const <String>[
25 // Encoding of redirecting factories have changed.
26 'redirecting_factory',
27 ];
24 28
25 main(List<String> arguments) { 29 main(List<String> arguments) {
26 Compiler compiler = compilerFor( 30 Compiler compiler = compilerFor(
27 options: [Flags.analyzeOnly, Flags.analyzeMain, Flags.useKernel]); 31 options: [Flags.analyzeOnly, Flags.analyzeMain, Flags.useKernel]);
28 Directory directory = new Directory('${TESTCASE_DIR}/input'); 32 Directory directory = new Directory('${TESTCASE_DIR}/input');
29 for (FileSystemEntity file in directory.listSync()) { 33 for (FileSystemEntity file in directory.listSync()) {
30 if (file is File && file.path.endsWith('.dart')) { 34 if (file is File && file.path.endsWith('.dart')) {
31 String name = pathlib.basenameWithoutExtension(file.path); 35 String name = pathlib.basenameWithoutExtension(file.path);
32 bool selected = arguments.contains(name); 36 bool selected = arguments.contains(name);
33 if (!selected) { 37 if (!selected) {
(...skipping 23 matching lines...) Expand all
57 print('--expected--------------------------------------------------'); 61 print('--expected--------------------------------------------------');
58 print(expected); 62 print(expected);
59 print('--actual----------------------------------------------------'); 63 print('--actual----------------------------------------------------');
60 print(actual); 64 print(actual);
61 } 65 }
62 expect(actual, equals(expected)); 66 expect(actual, equals(expected));
63 }); 67 });
64 } 68 }
65 } 69 }
66 } 70 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/kernel/impact_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698