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

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

Issue 13133006: Check for cyclic type variable bounds. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased + pull in PostProcess code. Created 7 years, 8 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 | Annotate | Revision Log
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 // Test constant folding. 4 // Test constant folding.
5 5
6 library compiler_helper; 6 library compiler_helper;
7 7
8 import "package:expect/expect.dart"; 8 import "package:expect/expect.dart";
9 import 'dart:uri'; 9 import 'dart:uri';
10 export 'dart:uri' show Uri; 10 export 'dart:uri' show Uri;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 leg.CodegenWorkItem work = 71 leg.CodegenWorkItem work =
72 new leg.CodegenWorkItem(element, resolutionWork.resolutionTree, context); 72 new leg.CodegenWorkItem(element, resolutionWork.resolutionTree, context);
73 compiler.phase = Compiler.PHASE_COMPILING; 73 compiler.phase = Compiler.PHASE_COMPILING;
74 work.run(compiler, compiler.enqueuer.codegen); 74 work.run(compiler, compiler.enqueuer.codegen);
75 js.JavaScriptBackend backend = compiler.backend; 75 js.JavaScriptBackend backend = compiler.backend;
76 return backend.assembleCode(element); 76 return backend.assembleCode(element);
77 } 77 }
78 78
79 MockCompiler compilerFor(String code, Uri uri, 79 MockCompiler compilerFor(String code, Uri uri,
80 {bool analyzeAll: false, 80 {bool analyzeAll: false,
81 bool analyzeOnly: false,
81 String coreSource: DEFAULT_CORELIB}) { 82 String coreSource: DEFAULT_CORELIB}) {
82 MockCompiler compiler = new MockCompiler( 83 MockCompiler compiler = new MockCompiler(
83 analyzeAll: analyzeAll, coreSource: coreSource); 84 analyzeAll: analyzeAll,
85 analyzeOnly: analyzeOnly,
86 coreSource: coreSource);
84 compiler.sourceFiles[uri.toString()] = new SourceFile(uri.toString(), code); 87 compiler.sourceFiles[uri.toString()] = new SourceFile(uri.toString(), code);
85 return compiler; 88 return compiler;
86 } 89 }
87 90
88 String compileAll(String code, {String coreSource: DEFAULT_CORELIB}) { 91 String compileAll(String code, {String coreSource: DEFAULT_CORELIB}) {
89 Uri uri = new Uri.fromComponents(scheme: 'source'); 92 Uri uri = new Uri.fromComponents(scheme: 'source');
90 MockCompiler compiler = compilerFor(code, uri, coreSource: coreSource); 93 MockCompiler compiler = compilerFor(code, uri, coreSource: coreSource);
91 compiler.runCompiler(uri); 94 compiler.runCompiler(uri);
92 Expect.isFalse(compiler.compilationFailed, 95 Expect.isFalse(compiler.compilationFailed,
93 'Unexpected compilation error'); 96 'Unexpected compilation error');
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 final xRe = new RegExp('\\bx\\b'); 206 final xRe = new RegExp('\\bx\\b');
204 regexp = regexp.replaceAll(xRe, '(?:$anyIdentifier)'); 207 regexp = regexp.replaceAll(xRe, '(?:$anyIdentifier)');
205 final spaceRe = new RegExp('\\s+'); 208 final spaceRe = new RegExp('\\s+');
206 regexp = regexp.replaceAll(spaceRe, '(?:\\s*)'); 209 regexp = regexp.replaceAll(spaceRe, '(?:\\s*)');
207 if (shouldMatch) { 210 if (shouldMatch) {
208 Expect.isTrue(new RegExp(regexp).hasMatch(generated)); 211 Expect.isTrue(new RegExp(regexp).hasMatch(generated));
209 } else { 212 } else {
210 Expect.isFalse(new RegExp(regexp).hasMatch(generated)); 213 Expect.isFalse(new RegExp(regexp).hasMatch(generated));
211 } 214 }
212 } 215 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/warnings.dart ('k') | tests/compiler/dart2js/type_equals_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698