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

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

Issue 27510003: Scanner for UTF-8 byte arrays (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fixes compiler tests Created 7 years, 2 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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:expect/expect.dart'; 6 import 'package:expect/expect.dart';
7 import "package:async_helper/async_helper.dart"; 7 import "package:async_helper/async_helper.dart";
8 import '../../../sdk/lib/_internal/compiler/implementation/types/types.dart' 8 import '../../../sdk/lib/_internal/compiler/implementation/types/types.dart'
9 show TypeMask; 9 show TypeMask;
10 10
11 import 'compiler_helper.dart'; 11 import 'compiler_helper.dart';
12 import 'parser_helper.dart'; 12 import 'parser_helper.dart';
13 13
14 void compileAndFind(String code, 14 void compileAndFind(String code,
15 String className, 15 String className,
16 String memberName, 16 String memberName,
17 bool disableInlining, 17 bool disableInlining,
18 check(compiler, element)) { 18 check(compiler, element)) {
19 Uri uri = new Uri(scheme: 'source'); 19 Uri uri = new Uri(scheme: 'source');
20 var compiler = compilerFor(code, uri); 20 var compiler = compilerFor(code, uri);
21 asyncTest(() => compiler.runCompiler(uri).then((_) { 21 asyncTest(() => compiler.runCompiler(uri).then((_) {
22 compiler.disableInlining = disableInlining; 22 compiler.disableInlining = disableInlining;
23 var cls = findElement(compiler, className); 23 var cls = findElement(compiler, className);
24 var member = cls.lookupMember(buildSourceString(memberName)); 24 var member = cls.lookupMember(memberName);
25 check(compiler, member); 25 check(compiler, member);
26 })); 26 }));
27 } 27 }
28 28
29 const String TEST_1 = r""" 29 const String TEST_1 = r"""
30 class A { 30 class A {
31 int f; 31 int f;
32 } 32 }
33 main() { new A(); } 33 main() { new A(); }
34 """; 34 """;
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 'f5': (compiler) => compiler.typesTask.numType.nullable(), 544 'f5': (compiler) => compiler.typesTask.numType.nullable(),
545 'f6': (compiler) => compiler.typesTask.stringType.nullable() }); 545 'f6': (compiler) => compiler.typesTask.stringType.nullable() });
546 546
547 runTest(TEST_25, {'f1': (compiler) => compiler.typesTask.intType }); 547 runTest(TEST_25, {'f1': (compiler) => compiler.typesTask.intType });
548 runTest(TEST_26, {'f1': (compiler) => compiler.typesTask.intType }); 548 runTest(TEST_26, {'f1': (compiler) => compiler.typesTask.intType });
549 } 549 }
550 550
551 void main() { 551 void main() {
552 test(); 552 test();
553 } 553 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698