[vm/test] Fix imports

Reduces the number of warnings originating from runtime/tests/vm/dart.

Change-Id: I0f6f527145c9b389952b5fa09a9d4e03824b9bf3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/357900
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
This commit is contained in:
Daco Harkes 2024-03-15 17:21:30 +00:00 committed by Commit Queue
parent aa58a628e2
commit 51ed0e5b07
47 changed files with 8 additions and 76 deletions

View file

@ -9,7 +9,6 @@
import 'dart:ffi';
import 'package:expect/expect.dart';
import 'package:ffi/ffi.dart';
import 'package:vm/testing/il_matchers.dart';
@pragma('vm:never-inline')

View file

@ -1,4 +1,6 @@
import "package:expect/expect.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.
class MethodChannel {
final String name;

View file

@ -12,8 +12,6 @@
// stack traces when unwinding through various built-in [Stream] methods.
import 'dart:async';
import 'package:expect/expect.dart';
import 'harness.dart' as harness;
Future<void> baz() async {

View file

@ -5,7 +5,6 @@
// Confirm that timezone information is available on pre-1970 dates, which
// was a problem on Windows.
import 'dart:async';
import 'dart:io';
import "package:expect/expect.dart";

View file

@ -4,7 +4,6 @@
// Verify deferred library status is per-isolate, not per-isolate-group.
import 'dart:async';
import 'dart:isolate';
import 'package:expect/expect.dart';

View file

@ -9,7 +9,6 @@
import 'dart:async';
import 'dart:io';
import 'package:expect/expect.dart';
import 'package:path/path.dart' as path;
import 'use_flag_test_helper.dart';

View file

@ -4,8 +4,6 @@
import 'dart:async';
import 'package:expect/expect.dart';
late StreamSubscription sub;
main() async {

View file

@ -7,8 +7,6 @@
// Test that array allocation in noSuchMethod dispatcher is preserving the
// length register correctly.
import 'dart:async';
import 'package:expect/expect.dart';
final List<dynamic> list = <dynamic>[];

View file

@ -4,7 +4,6 @@
// VMOptions=--old_gen_heap_size=20
import "dart:io";
import "dart:isolate";
import "package:expect/expect.dart";

View file

@ -5,7 +5,6 @@
import 'dart:developer';
import 'dart:isolate' as I;
import 'package:vm_service/vm_service.dart';
import 'package:vm_service/vm_service_io.dart';
int fib(int n) {

View file

@ -4,10 +4,8 @@
import "dart:async";
import "dart:io";
import "dart:convert";
import 'package:expect/config.dart';
import 'package:expect/expect.dart';
import 'package:path/path.dart' as path;
import 'package:test/test.dart';

View file

@ -7,7 +7,6 @@
// Isolate.exit() is invoked from native code, which in turns is invoked
// from dart code(hence "sandwich"-test).
import 'dart:async';
import 'dart:ffi';
import 'dart:io';
import 'dart:isolate';

View file

@ -3,7 +3,6 @@
// BSD-style license that can be found in the LICENSE file.
//
import 'dart:isolate';
import 'dart:nativewrappers';
import 'package:async_helper/async_helper.dart';
import 'package:expect/expect.dart';

View file

@ -6,7 +6,6 @@ import 'dart:async';
import 'dart:isolate';
import 'package:async_helper/async_helper.dart' show asyncEnd, asyncStart;
import 'package:expect/expect.dart';
class A<T> {}

View file

@ -5,7 +5,6 @@
import 'dart:isolate';
import "package:async_helper/async_helper.dart";
import "package:expect/expect.dart";
worker(SendPort sendPort) {
final re = RegExp(r'(x+)*y');

View file

@ -10,7 +10,6 @@ import 'dart:io';
import 'dart:isolate';
import 'package:expect/expect.dart';
import "package:test/test.dart";
class Foo {
var bar = 123;

View file

@ -2,8 +2,6 @@
// 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:async';
import 'dart:io';
import 'dart:isolate';
import "package:async_helper/async_helper.dart";

View file

@ -2,7 +2,6 @@
// 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:async';
import 'dart:isolate';
import 'package:async_helper/async_helper.dart';

View file

@ -8,9 +8,7 @@
import 'dart:async';
import 'dart:io';
import 'dart:isolate';
import 'dart:nativewrappers';
import 'package:async_helper/async_helper.dart';
import 'package:expect/expect.dart';
import 'send_unsupported_objects_test.dart';

View file

@ -8,8 +8,6 @@
// VMOptions=--optimization_counter_threshold=10 --no-use-osr --no-background-compilation
import "package:expect/expect.dart";
class Flag {
var value;
Flag(this.value);

View file

@ -8,14 +8,9 @@
// Program generated as:
// dart dartfuzz.dart --seed 194851581 --no-fp --no-ffi
import 'dart:async';
import 'dart:cli';
import 'dart:collection';
import 'dart:convert';
import 'dart:core';
import 'dart:io';
import 'dart:isolate';
import 'dart:math';
import 'dart:typed_data';
Map<int, String> var0 = {

View file

@ -4,8 +4,6 @@
import "package:expect/expect.dart";
import 'dart:collection';
main() {
for (final value in [const [], const {}.values]) {
final other = List.from(value);

View file

@ -4,7 +4,6 @@
// Verify that socket connection gracefully closes if cancelled.
import 'dart:async';
import 'dart:io';
import 'package:expect/expect.dart';

View file

@ -6,6 +6,6 @@ main() {
for (int i = 0; i < 1000000; ++i) {
try {
throw 'a';
} catch (e, s) {}
} catch (e) {}
}
}

View file

@ -10,8 +10,6 @@
//
// VMOptions=--optimization_counter_threshold=10 --no-background-compilation
import 'package:expect/expect.dart';
class Value {
const Value(this.val);

View file

@ -2,7 +2,6 @@
// 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:async';
import 'dart:io';
import 'package:expect/config.dart';

View file

@ -6,8 +6,6 @@
// Verifies that compiler doesn't crash if Typedef is only used from
// function type of a call.
import 'package:expect/expect.dart';
class Message {}
typedef void FooHandler(Message message);

View file

@ -8,7 +8,6 @@
// Program generated as:
// dart dartfuzz.dart --seed 929450448 --no-fp --no-ffi --no-flat
import 'dart:collection';
import 'dart:typed_data';
MapEntry<List<int>, Map<String, String>>? var0 =

View file

@ -6,7 +6,6 @@
// Verifies that compiler can infer type of captured local variable
// and propagate it to a nested function.
import 'package:expect/expect.dart';
import 'package:vm/testing/il_matchers.dart';
@pragma('vm:testing:match-inner-flow-graph', 'testForIn')

View file

@ -8,7 +8,6 @@
import 'dart:isolate';
import 'package:expect/expect.dart';
import '../../../../tests/language/generic/function_bounds_test.dart'
as function_bounds_test;

View file

@ -5,7 +5,6 @@
// Check that CreateArray has a proper type (with type arguments) attached
// to it.
import 'dart:async';
import 'package:vm/testing/il_matchers.dart';
final class A {}

View file

@ -9,7 +9,6 @@
// Trimmed down a program generated by the Dart Project Fuzz Tester (1.101):
// dart dartfuzz.dart --seed 1258834069 --no-fp --no-ffi --flat
import 'dart:io';
import 'dart:typed_data';
import 'package:expect/expect.dart';

View file

@ -6,7 +6,6 @@
import 'dart:_internal';
import 'dart:ffi';
import 'dart:io';
import 'package:expect/config.dart';

View file

@ -9,12 +9,9 @@
// Check that subprocess spawning implementation uses _exit rather than exit on
// paths which terminate fork child without exec-ing.
import 'dart:async';
import 'dart:ffi';
import 'dart:io';
import 'dart:isolate';
import "package:expect/expect.dart";
import '../../../../tests/ffi/dylib_utils.dart';
final ffiTestFunctions = dlopenPlatformSpecific('ffi_test_functions');

View file

@ -10,8 +10,6 @@
// This would cause a crash due to bad offsets causing entry to hit the pre-code
// barrier of int3s.
import 'dart:async';
Iterable<bool> state_machine() sync* {
bool a = true;

View file

@ -8,7 +8,6 @@
// slow-path stack overflow checks which uses shared runtime stubs.
import 'package:expect/expect.dart';
import 'dart:math';
filter_me() {
int s = 0;

View file

@ -4,7 +4,6 @@
// Verifies that compiler can do CSE and LICM of taking a tear-off.
import 'package:expect/expect.dart';
import 'package:vm/testing/il_matchers.dart';
class A {

View file

@ -103,8 +103,6 @@ Future<Null> isolateMain(StartMessage startMessage) async {
if (received == null) {
break;
}
final receivedData =
received is TransferableTypedData ? received.materialize() : received;
final packagedData = packageList(data, startMessage.useTransferable);

View file

@ -12,13 +12,9 @@
// Test that ensures correct exception when running out of memory for
// really large transferable.
import 'dart:async';
import 'dart:collection';
import 'dart:core';
import 'dart:io';
import 'dart:isolate';
import 'dart:typed_data';
import 'dart:math';
import "package:expect/expect.dart";

View file

@ -10,12 +10,9 @@
// OtherResources=use_save_debugging_info_flag_program.dart
import "dart:io";
import "dart:math";
import "dart:typed_data";
import 'package:expect/expect.dart';
import 'package:native_stack_traces/elf.dart';
import 'package:native_stack_traces/native_stack_traces.dart';
import 'package:native_stack_traces/src/dwarf_container.dart';
import 'package:native_stack_traces/src/macho.dart';
import 'package:path/path.dart' as path;

View file

@ -7,7 +7,6 @@
// OtherResources=use_save_debugging_info_flag_program.dart
import "dart:async";
import "dart:io";
import 'package:expect/expect.dart';
@ -191,9 +190,9 @@ void checkSymbols(List<Symbol>? snapshotSymbols, List<Symbol> debugInfoSymbols,
void checkElf(Elf? snapshot, Elf debugInfo, {required bool isAssembled}) {
// All symbol tables have an initial entry with zero-valued fields.
final snapshotDynamicSymbols = snapshot?.dynamicSymbols?.skip(1)?.toList();
final snapshotDynamicSymbols = snapshot?.dynamicSymbols.skip(1).toList();
final debugDynamicSymbols = debugInfo.dynamicSymbols.skip(1).toList();
final snapshotStaticSymbols = snapshot?.staticSymbols?.skip(1)?.toList();
final snapshotStaticSymbols = snapshot?.staticSymbols.skip(1).toList();
final debugStaticSymbols = debugInfo.staticSymbols.skip(1).toList();
// First, do our general round of checks against each group of tables.

View file

@ -6,8 +6,6 @@
import 'dart:_internal' show VMInternalsForTesting;
import "package:expect/expect.dart";
class C {
// operator*(o) is missing to trigger a noSuchMethodError when a C object
// is used in the multiplication below.

View file

@ -7,7 +7,6 @@
//
// VMOptions=--dwarf-stack-traces --resolve-dwarf-paths --save-debugging-info=$TEST_COMPILATION_DIR/debug.so
import "dart:async";
import "dart:io";
import 'package:expect/expect.dart';

View file

@ -4,8 +4,6 @@
// Test that the full stacktrace in an error object matches the stacktrace
// handed to the catch clause.
import "package:expect/expect.dart";
class C {
// operator*(o) is missing to trigger a noSuchMethodError when a C object
// is used in the multiplication below.
@ -15,5 +13,5 @@ bar(c) => c * 4;
foo(c) => bar(c);
main() {
var a = foo(new C());
foo(new C());
}

View file

@ -77,7 +77,7 @@ Future<void> testTracePrecompiler(
String tempDir, String scriptDill, List<String> flags) async {
final reasonsFile = path.join(tempDir, 'reasons.json');
final snapshot = path.join(tempDir, 'snapshot.so');
final result = await run(genSnapshot, <String>[
await run(genSnapshot, <String>[
...flags,
'--write-retained-reasons-to=$reasonsFile',
'--snapshot-kind=app-aot-elf',

View file

@ -67,8 +67,6 @@ Future<void> testJIT(String dillPath, String snapshotKind) async {
await withTempDir('v8-snapshot-profile-$description', (String tempDir) async {
// Generate the snapshot profile.
final profilePath = path.join(tempDir, 'profile.heapsnapshot');
final vmTextPath = path.join(tempDir, 'vm_instructions.bin');
final isolateTextPath = path.join(tempDir, 'isolate_instructions.bin');
final vmDataPath = path.join(tempDir, 'vm_data.bin');
final isolateDataPath = path.join(tempDir, 'isolate_data.bin');

View file

@ -4,7 +4,6 @@
// SharedObjects=ffi_test_functions
import 'dart:async';
import 'dart:ffi';
import 'dart:isolate';