Unverified Commit 2b14e993 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Cleanup random dead test code (#104568)

parent da24f105
......@@ -8,10 +8,7 @@ import 'package:flutter_driver/src/common/error.dart';
import 'package:test_api/test_api.dart'; // ignore: deprecated_member_use
export 'package:test_api/fake.dart'; // ignore: deprecated_member_use
export 'package:test_api/test_api.dart' hide isInstanceOf; // ignore: deprecated_member_use
/// A matcher that compares the type of the actual value to the type argument T.
TypeMatcher<T> isInstanceOf<T>() => isA<T>();
export 'package:test_api/test_api.dart'; // ignore: deprecated_member_use
void tryToDelete(Directory directory) {
// This should not be necessary, but it turns out that
......@@ -26,6 +23,3 @@ void tryToDelete(Directory directory) {
/// Matcher for functions that throw [DriverError].
final Matcher throwsDriverError = throwsA(isA<DriverError>());
/// Matcher for functions that throw [AssertionError].
final Matcher throwsAssertionError = throwsA(isA<AssertionError>());
......@@ -4,7 +4,6 @@
// See also dev/automated_tests/flutter_test/flutter_gold_test.dart
import 'dart:async';
import 'dart:convert';
import 'dart:io' hide Directory;
import 'dart:typed_data';
......@@ -1090,23 +1089,6 @@ class FakeHttpClientRequest extends Fake implements HttpClientRequest {
}
}
class FakeHttpClientResponse extends Fake implements HttpClientResponse {
FakeHttpClientResponse(this.response);
final List<int> response;
@override
StreamSubscription<List<int>> listen(
void Function(List<int> event)? onData, {
Function? onError,
void Function()? onDone,
bool? cancelOnError,
}) {
return Stream<List<int>>.fromFuture(Future<List<int>>.value(response))
.listen(onData, onError: onError, onDone: onDone, cancelOnError: cancelOnError);
}
}
class FakeHttpImageResponse extends Fake implements HttpClientResponse {
FakeHttpImageResponse(this.response);
......
......@@ -782,31 +782,6 @@ class FakeMatcher extends AsyncMatcher {
Description describe(Description description) => description.add('--fake--');
}
class _SingleTickerTest extends StatefulWidget {
const _SingleTickerTest();
@override
_SingleTickerTestState createState() => _SingleTickerTestState();
}
class _SingleTickerTestState extends State<_SingleTickerTest> with SingleTickerProviderStateMixin {
late AnimationController controller;
@override
void initState() {
super.initState();
controller = AnimationController(
vsync: this,
duration: const Duration(seconds: 100),
) ;
}
@override
Widget build(BuildContext context) {
return Container();
}
}
class _AlwaysAnimating extends StatefulWidget {
const _AlwaysAnimating({
required this.onPaint,
......
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:test/test.dart';
export 'package:test/test.dart' hide isInstanceOf;
/// A matcher that compares the type of the actual value to the type argument T.
TypeMatcher<T> isInstanceOf<T>() => isA<T>();
......@@ -4,10 +4,9 @@
import 'package:fuchsia_remote_debug_protocol/fuchsia_remote_debug_protocol.dart';
import 'package:test/fake.dart';
import 'package:test/test.dart';
import 'package:vm_service/vm_service.dart' as vms;
import 'common.dart';
void main() {
group('FuchsiaRemoteConnection.connect', () {
late List<FakePortForwarder> forwardedPorts;
......
......@@ -4,7 +4,7 @@
import 'package:fuchsia_remote_debug_protocol/src/common/network.dart';
import '../../common.dart';
import 'package:test/test.dart';
void main() {
final List<String> ipv4Addresses = <String>['127.0.0.1', '8.8.8.8'];
......
......@@ -6,10 +6,9 @@ import 'dart:async';
import 'package:fuchsia_remote_debug_protocol/src/dart/dart_vm.dart';
import 'package:test/fake.dart';
import 'package:test/test.dart';
import 'package:vm_service/vm_service.dart' as vms;
import '../../common.dart';
void main() {
group('DartVm.connect', () {
tearDown(() {
......
......@@ -9,7 +9,7 @@ import 'package:fuchsia_remote_debug_protocol/src/runners/ssh_command_runner.dar
import 'package:process/process.dart';
import 'package:test/fake.dart';
import '../../common.dart';
import 'package:test/test.dart';
void main() {
group('SshCommandRunner.constructors', () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment