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

Unified Diff: tests/compiler/dart2js/backend_dart/sexpr2_test.dart

Issue 2213673002: Delete dart_backend from compiler. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/backend_dart/sexpr2_test.dart
diff --git a/tests/compiler/dart2js/backend_dart/sexpr2_test.dart b/tests/compiler/dart2js/backend_dart/sexpr2_test.dart
deleted file mode 100644
index 03803bddf5ba18d8c696acea2d2d4fe60be100a8..0000000000000000000000000000000000000000
--- a/tests/compiler/dart2js/backend_dart/sexpr2_test.dart
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Unittest test of the CPS ir generated by the dart2dart compiler.
-library dart_backend.sexpr2_test;
-
-import 'package:compiler/src/compiler.dart';
-import 'package:compiler/src/cps_ir/cps_ir_nodes.dart';
-import 'package:compiler/src/cps_ir/cps_ir_nodes_sexpr.dart';
-import 'package:compiler/src/elements/elements.dart';
-import 'package:expect/expect.dart';
-
-import '../../../../pkg/analyzer2dart/test/test_helper.dart';
-import '../../../../pkg/analyzer2dart/test/sexpr_data.dart';
-
-import 'test_helper.dart';
-
-main(List<String> args) {
- performTests(TEST_DATA, asyncTester, runTest, args);
-}
-
-runTest(TestSpec result) {
- return compilerFor(result.input).then((Compiler compiler) {
- void checkOutput(String elementName,
- Element element,
- String expectedOutput) {
- FunctionDefinition ir = compiler.irBuilder.getIr(element);
- if (expectedOutput == null) {
- Expect.isNull(ir, "\nInput:\n${result.input}\n"
- "No CPS IR expected for $element");
- } else {
- Expect.isNotNull(ir, "\nInput:\n${result.input}\n"
- "No CPS IR for $element");
- expectedOutput = expectedOutput.trim();
- String output = ir.accept(new SExpressionStringifier()).trim();
- Expect.equals(expectedOutput, output,
- "\nInput:\n${result.input}\n"
- "Expected for '$elementName':\n$expectedOutput\n"
- "Actual for '$elementName':\n$output\n");
- }
- }
-
- if (result.output is String) {
- checkOutput('main', compiler.mainFunction, result.output);
- } else {
- assert(result.output is Map<String, String>);
- result.output.forEach((String elementName, String output) {
- Element element;
- if (elementName.contains('.')) {
- ClassElement cls = compiler.mainApp.localLookup(
- elementName.substring(0, elementName.indexOf('.')));
- element = cls.localLookup(
- elementName.substring(elementName.indexOf('.') + 1));
- } else {
- element = compiler.mainApp.localLookup(elementName);
- }
- checkOutput(elementName, element, output);
- });
- }
- });
-}
« no previous file with comments | « tests/compiler/dart2js/backend_dart/opt_shrinking_test.dart ('k') | tests/compiler/dart2js/backend_dart/sexpr_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698