| Index: tests/compiler/dart2js/serialization_model_test.dart
|
| diff --git a/tests/compiler/dart2js/serialization_model_test.dart b/tests/compiler/dart2js/serialization_model_test.dart
|
| index 0e5363f3b4b2e26430bf87c94623f1c8e4ccaa37..071d8032551b56dbe8bb393343990fbdb79083df 100644
|
| --- a/tests/compiler/dart2js/serialization_model_test.dart
|
| +++ b/tests/compiler/dart2js/serialization_model_test.dart
|
| @@ -30,36 +30,12 @@ import 'serialization_helper.dart';
|
| import 'serialization_test_data.dart';
|
| import 'serialization_test_helper.dart';
|
|
|
| -main(List<String> arguments) {
|
| - String filename;
|
| - for (String arg in arguments) {
|
| - if (!arg.startsWith('-')) {
|
| - filename = arg;
|
| - }
|
| - }
|
| - bool verbose = arguments.contains('-v');
|
| -
|
| +main(List<String> args) {
|
| asyncTest(() async {
|
| - print('------------------------------------------------------------------');
|
| - print('serialize dart:core');
|
| - print('------------------------------------------------------------------');
|
| - String serializedData;
|
| - File file = new File('out.data');
|
| - if (arguments.contains('-l')) {
|
| - if (file.existsSync()) {
|
| - print('Loading data from $file');
|
| - serializedData = file.readAsStringSync();
|
| - }
|
| - }
|
| - if (serializedData == null) {
|
| - serializedData = await serializeDartCore();
|
| - if (arguments.contains('-s')) {
|
| - print('Saving data to $file');
|
| - file.writeAsStringSync(serializedData);
|
| - }
|
| - }
|
| - if (filename != null) {
|
| - Uri entryPoint = Uri.base.resolve(nativeToUriPath(filename));
|
| + Arguments arguments = new Arguments.from(args);
|
| + String serializedData = await serializeDartCore(arguments: arguments);
|
| + if (arguments.filename != null) {
|
| + Uri entryPoint = Uri.base.resolve(nativeToUriPath(arguments.filename));
|
| await check(serializedData, entryPoint);
|
| } else {
|
| Uri entryPoint = Uri.parse('memory:main.dart');
|
| @@ -75,7 +51,7 @@ main(List<String> arguments) {
|
| serializedData,
|
| entryPoint,
|
| sourceFiles: test.sourceFiles,
|
| - verbose: verbose);
|
| + verbose: arguments.verbose);
|
| }
|
| }
|
| });
|
|
|