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

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

Issue 2939063002: Strong mode cleaning of many dart2js tests. (Closed)
Patch Set: Use ClassElement. Created 3 years, 6 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 'package:compiler/compiler_new.dart';
8 import 'memory_compiler.dart'; 8 import 'memory_compiler.dart';
9 9
10 const MEMORY_SOURCE_FILES = const { 10 const MEMORY_SOURCE_FILES = const {
(...skipping 20 matching lines...) Expand all
31 print(foo(23412)); 31 print(foo(23412));
32 print(A.bar(87654)); 32 print(A.bar(87654));
33 print(new A().gee(1337, 919182)); 33 print(new A().gee(1337, 919182));
34 print(new A().field + 1); 34 print(new A().field + 1);
35 }''' 35 }'''
36 }; 36 };
37 37
38 void main() { 38 void main() {
39 asyncTest(() async { 39 asyncTest(() async {
40 OutputCollector collector = new OutputCollector(); 40 OutputCollector collector = new OutputCollector();
41 CompilationResult result = await runCompiler( 41 await runCompiler(
42 memorySourceFiles: MEMORY_SOURCE_FILES, outputProvider: collector); 42 memorySourceFiles: MEMORY_SOURCE_FILES, outputProvider: collector);
43 // 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
44 // 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.
45 String jsOutput = collector.getOutput('', OutputType.js); 45 String jsOutput = collector.getOutput('', OutputType.js);
46 46
47 Expect.isTrue(jsOutput.contains('49912344')); 47 Expect.isTrue(jsOutput.contains('49912344'));
48 Expect.isTrue(jsOutput.contains('123455')); 48 Expect.isTrue(jsOutput.contains('123455'));
49 Expect.isTrue(jsOutput.contains('81234512')); 49 Expect.isTrue(jsOutput.contains('81234512'));
50 Expect.isFalse(jsOutput.contains('49935756')); 50 Expect.isFalse(jsOutput.contains('49935756'));
51 Expect.isFalse(jsOutput.contains('211109')); 51 Expect.isFalse(jsOutput.contains('211109'));
52 Expect.isFalse(jsOutput.contains('82155031')); 52 Expect.isFalse(jsOutput.contains('82155031'));
53 Expect.isFalse(jsOutput.contains('4712')); 53 Expect.isFalse(jsOutput.contains('4712'));
54 }); 54 });
55 } 55 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698