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

Side by Side Diff: test/parse_test.dart

Issue 2402473002: Add ClosureInfo for closures. (Closed)
Patch Set: update parse test Created 4 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
« no previous file with comments | « test/hello_world/hello_world.js.info.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:convert'; 5 import 'dart:convert';
6 import 'dart:io'; 6 import 'dart:io';
7 7
8 import 'package:dart2js_info/info.dart'; 8 import 'package:dart2js_info/info.dart';
9 import 'package:test/test.dart'; 9 import 'package:test/test.dart';
10 10
11 main() { 11 main() {
12 group('parse', () { 12 group('parse', () {
13 test('hello_world', () { 13 test('hello_world', () {
14 var helloWorld = new File('test/hello_world/hello_world.js.info.json'); 14 var helloWorld = new File('test/hello_world/hello_world.js.info.json');
15 var json = JSON.decode(helloWorld.readAsStringSync()); 15 var json = JSON.decode(helloWorld.readAsStringSync());
16 var decoded = new AllInfoJsonCodec().decode(json); 16 var decoded = new AllInfoJsonCodec().decode(json);
17 17
18 var program = decoded.program; 18 var program = decoded.program;
19 expect(program, isNotNull); 19 expect(program, isNotNull);
20 20
21 expect(program.entrypoint, isNotNull); 21 expect(program.entrypoint, isNotNull);
22 expect(program.size, 10124); 22 expect(program.size, 10116);
23 expect(program.compilationMoment, 23 expect(program.compilationMoment,
24 DateTime.parse("2016-09-30 16:14:58.038530")); 24 DateTime.parse("2016-10-06 10:14:59.145665"));
25 expect(program.compilationDuration, new Duration(microseconds: 2726976)); 25 expect(program.compilationDuration, new Duration(microseconds: 2729236));
26 expect(program.toJsonDuration, new Duration(milliseconds: 4)); 26 expect(program.toJsonDuration, new Duration(milliseconds: 4));
27 expect(program.dumpInfoDuration, new Duration(seconds: 0)); 27 expect(program.dumpInfoDuration, new Duration(seconds: 0));
28 expect(program.noSuchMethodEnabled, false); 28 expect(program.noSuchMethodEnabled, false);
29 expect(program.minified, false); 29 expect(program.minified, false);
30 }); 30 });
31 }); 31 });
32 } 32 }
OLDNEW
« no previous file with comments | « test/hello_world/hello_world.js.info.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698