blob: b011929ba203c39eab8d51374c72f20b4b2d8e86 [file] [log] [blame]
// Copyright (c) 2014, 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.
// @dart = 2.9
// Tests proper object recognition in disassembler.
import 'dart:async';
import 'dart:io';
import "package:expect/expect.dart";
Future runBinary(String binary, List<String> arguments) async {
print("+ $binary " + arguments.join(" "));
final result = await, arguments);
return result;
f(x) {
return "foo";
Future<void> main(List<String> args) async {
if (args.contains('--child')) {
if (Platform.executable.contains("Product")) {
return; // No disassembler in product mode.
final result = await runBinary(Platform.executable,
['--disassemble', Platform.script.toFilePath(), '--child']);
Expect.equals(0, result.exitCode);