5cacaca050
Change-Id: I2e3eb18c9bc515d96efa6f454d092f66a63c7090 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400720 Auto-Submit: Mayank Patke <fishythefish@google.com> Reviewed-by: Nate Biggs <natebiggs@google.com> Commit-Queue: Nate Biggs <natebiggs@google.com> Commit-Queue: Mayank Patke <fishythefish@google.com>
36 lines
1.1 KiB
Dart
36 lines
1.1 KiB
Dart
// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
import 'dart:convert';
|
|
|
|
import 'package:dart2js_info/json_info_codec.dart';
|
|
import 'package:test/test.dart';
|
|
|
|
import 'test_shared.dart';
|
|
|
|
void main() {
|
|
group('parse', () {
|
|
test('hello_world', () async {
|
|
var content = await helloWorldDumpInfo();
|
|
var json = jsonDecode(content);
|
|
var decoded = AllInfoJsonCodec().decode(json);
|
|
|
|
final program = decoded.program;
|
|
expect(program, isNotNull);
|
|
|
|
expect(program!.entrypoint, isNotNull);
|
|
expect(program.size, 90293);
|
|
expect(
|
|
program.compilationMoment,
|
|
DateTime.parse("2022-07-14 17:35:15.006337"),
|
|
);
|
|
expect(program.compilationDuration, Duration(microseconds: 1289072));
|
|
expect(program.toJsonDuration, Duration(milliseconds: 2));
|
|
expect(program.dumpInfoDuration, Duration(seconds: 0));
|
|
expect(program.noSuchMethodEnabled, false);
|
|
expect(program.minified, false);
|
|
});
|
|
});
|
|
}
|