Files
sdk/tests/compiler/dart2js/serialization/on_disk_split_test.dart
T
Johnni Winther 556dd9a345 Add support for serialization on command-line
Change-Id: I4fa85c3e06e1f142265cecff83ff1b8db74bfe65
Reviewed-on: https://dart-review.googlesource.com/c/82445
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-11-02 14:12:18 +00:00

30 lines
904 B
Dart

// Copyright (c) 2018, 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:io';
import 'package:async_helper/async_helper.dart';
import 'package:compiler/src/commandline_options.dart';
import 'package:compiler/src/dart2js.dart';
main(List<String> args) {
asyncTest(() async {
Directory dir = await Directory.systemTemp.createTemp('on_disk');
Uri dillUri = dir.uri.resolve('out.dill');
Uri outUri = dir.uri.resolve('out.js');
await internalMain([
'samples-dev/swarm/swarm.dart',
'--out=${dillUri}',
Flags.writeData,
Flags.verbose,
]);
await internalMain([
'${dillUri}',
'--out=${outUri}',
Flags.readData,
Flags.verbose,
]);
await dir.delete(recursive: true);
});
}