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

Unified Diff: dart/tests/compiler/dart2js/return_type_inferer_test.dart

Issue 10879006: Create an outline of metadata API in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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
« no previous file with comments | « dart/tests/compiler/dart2js/metadata_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tests/compiler/dart2js/return_type_inferer_test.dart
diff --git a/dart/tests/compiler/dart2js/return_type_inferer_test.dart b/dart/tests/compiler/dart2js/return_type_inferer_test.dart
index cc83fb1cd45c592bdfd3572dacefa87c9119ae94..1d0ce1921e445789ba9f98dc202e5125a26059a3 100644
--- a/dart/tests/compiler/dart2js/return_type_inferer_test.dart
+++ b/dart/tests/compiler/dart2js/return_type_inferer_test.dart
@@ -2,22 +2,9 @@
// 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.
-#import("dart:uri");
-
#import("../../../lib/compiler/implementation/ssa/ssa.dart");
#import('compiler_helper.dart');
-#import('parser_helper.dart');
-
-void compileAndFind(String code,
- String functionName,
- check(compiler, element)) {
- Uri uri = new Uri.fromComponents(scheme: 'source');
- var compiler = compilerFor(code, uri);
- compiler.runCompiler(uri);
- var fun = findElement(compiler, functionName);
- return check(compiler.backend, fun);
-}
final String TEST_ONE = @"""
f(p) => p;
@@ -71,10 +58,11 @@ final String TEST_TEN = @"""
""";
void runTest(String test, [HType expectedType = HType.UNKNOWN]) {
- compileAndFind(
+ compileAndCheck(
test,
'f',
- (backend, x) {
+ (compiler, x) {
+ var backend = compiler.backend;
HType type =
backend.optimisticReturnTypesWithRecompilationOnTypeChange(null, x);
Expect.equals(expectedType, type);
« no previous file with comments | « dart/tests/compiler/dart2js/metadata_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698