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

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

Issue 2345083003: dart2js: run dartfmt on tests (Closed)
Patch Set: revert another multipart test Created 4 years, 3 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 'memory_compiler.dart'; 8 import 'memory_compiler.dart';
9 9
10 const MEMORY_SOURCE_FILES = const { 10 const MEMORY_SOURCE_FILES = const {
11 'main.dart': ''' 11 'main.dart': '''
12 main() { 12 main() {
13 print(12300000); 13 print(12300000);
14 print(1234567890123456789012345); 14 print(1234567890123456789012345);
15 print(double.MAX_FINITE); 15 print(double.MAX_FINITE);
16 print(-22230000); 16 print(-22230000);
17 }'''}; 17 }'''
18 };
18 19
19 Future test({bool minify}) async { 20 Future test({bool minify}) async {
20 OutputCollector collector = new OutputCollector(); 21 OutputCollector collector = new OutputCollector();
21 await runCompiler( 22 await runCompiler(
22 memorySourceFiles: MEMORY_SOURCE_FILES, 23 memorySourceFiles: MEMORY_SOURCE_FILES,
23 outputProvider: collector, 24 outputProvider: collector,
24 options: minify ? ['--minify'] : []); 25 options: minify ? ['--minify'] : []);
25 26
26 // Check that we use the shorter exponential representations. 27 // Check that we use the shorter exponential representations.
27 String jsOutput = collector.getOutput('', 'js'); 28 String jsOutput = collector.getOutput('', 'js');
(...skipping 15 matching lines...) Expand all
43 // for its prefix. 44 // for its prefix.
44 Expect.isFalse(jsOutput.contains('179769313486231570814527423731')); 45 Expect.isFalse(jsOutput.contains('179769313486231570814527423731'));
45 } 46 }
46 47
47 main() { 48 main() {
48 asyncTest(() async { 49 asyncTest(() async {
49 await test(minify: true); 50 await test(minify: true);
50 await test(minify: false); 51 await test(minify: false);
51 }); 52 });
52 } 53 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/null_type_test.dart ('k') | tests/compiler/dart2js/override_inheritance_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698