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

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

Issue 2690063002: Refactor CompilerOutput (Closed)
Patch Set: Updated cf. comments Created 3 years, 10 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
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 4
5 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 import "package:async_helper/async_helper.dart"; 6 import "package:async_helper/async_helper.dart";
7 import 'package:compiler/compiler_new.dart';
7 import 'memory_compiler.dart'; 8 import 'memory_compiler.dart';
8 9
9 const MEMORY_SOURCE_FILES = const { 10 const MEMORY_SOURCE_FILES = const {
10 'main.dart': ''' 11 'main.dart': '''
11 import 'package:expect/expect.dart'; 12 import 'package:expect/expect.dart';
12 13
13 @NoInline() 14 @NoInline()
14 foo(y) => 49912344 + y; 15 foo(y) => 49912344 + y;
15 16
16 class A { 17 class A {
(...skipping 17 matching lines...) Expand all
34 }''' 35 }'''
35 }; 36 };
36 37
37 void main() { 38 void main() {
38 asyncTest(() async { 39 asyncTest(() async {
39 OutputCollector collector = new OutputCollector(); 40 OutputCollector collector = new OutputCollector();
40 CompilationResult result = await runCompiler( 41 CompilationResult result = await runCompiler(
41 memorySourceFiles: MEMORY_SOURCE_FILES, outputProvider: collector); 42 memorySourceFiles: MEMORY_SOURCE_FILES, outputProvider: collector);
42 // Simply check that the constants of the small functions are still in the 43 // Simply check that the constants of the small functions are still in the
43 // output, and that we don't see the result of constant folding. 44 // output, and that we don't see the result of constant folding.
44 String jsOutput = collector.getOutput('', 'js'); 45 String jsOutput = collector.getOutput('', OutputType.js);
45 46
46 Expect.isTrue(jsOutput.contains('49912344')); 47 Expect.isTrue(jsOutput.contains('49912344'));
47 Expect.isTrue(jsOutput.contains('123455')); 48 Expect.isTrue(jsOutput.contains('123455'));
48 Expect.isTrue(jsOutput.contains('81234512')); 49 Expect.isTrue(jsOutput.contains('81234512'));
49 Expect.isFalse(jsOutput.contains('49935756')); 50 Expect.isFalse(jsOutput.contains('49935756'));
50 Expect.isFalse(jsOutput.contains('211109')); 51 Expect.isFalse(jsOutput.contains('211109'));
51 Expect.isFalse(jsOutput.contains('82155031')); 52 Expect.isFalse(jsOutput.contains('82155031'));
52 Expect.isFalse(jsOutput.contains('4712')); 53 Expect.isFalse(jsOutput.contains('4712'));
53 }); 54 });
54 } 55 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/dump_info_test.dart ('k') | tests/compiler/dart2js/line_column_provider_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698