docImports for flutter_test (#151189)

Part of https://github.com/flutter/flutter/issues/150800

Issues encountered:
This commit is contained in:
Michael Goderbauer 2024-07-02 16:05:52 -07:00 committed by GitHub
parent 46030f1eff
commit cfa7777f7a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
27 changed files with 123 additions and 6 deletions

View File

@ -51,6 +51,12 @@
/// * [debugCheckIntrinsicSizes], which can be set in a
/// `flutter_test_config.dart` file to enable deeper [RenderBox]
/// tests of the intrinsic APIs automatically while laying out widgets.
///
/// @docImport 'package:flutter/rendering.dart';
///
/// @docImport 'src/controller.dart';
/// @docImport 'src/test_compat.dart';
/// @docImport 'src/widget_tester.dart';
library flutter_test;
export 'dart:async' show Future;

View File

@ -207,7 +207,7 @@ class _MockHttpClient implements HttpClient {
}
}
/// A mocked [HttpClientRequest] which always returns a [_MockHttpClientResponse].
/// A mocked [HttpClientRequest] which always returns a [_MockHttpResponse].
class _MockHttpRequest implements HttpClientRequest {
@override
bool bufferOutput = true;

View File

@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'matchers.dart';
library;
import 'dart:async';
import 'dart:io';
import 'dart:math' as math;

View File

@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'matchers.dart';
library;
import 'dart:convert';
import 'dart:js_interop';
import 'dart:typed_data';
@ -42,12 +45,12 @@ Future<ComparisonResult> compareLists(List<int> test, List<int> master) async {
/// * [matchesGoldenFile], the function from [flutter_test] that invokes the
/// comparator.
class DefaultWebGoldenComparator extends WebGoldenComparator {
/// Creates a new [DefaultWebGoldenComparator] for the specified [testFile].
/// Creates a new [DefaultWebGoldenComparator] for the specified [testUri].
///
/// Golden file keys will be interpreted as file paths relative to the
/// directory in which [testFile] resides.
/// directory in which [testUri] resides.
///
/// The [testFile] URL must represent a file.
/// The [testUri] must represent a file.
DefaultWebGoldenComparator(this.testUri);
/// The test file currently being executed.

View File

@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'matchers.dart';
library;
import 'dart:typed_data';
import 'dart:ui' as ui;

View File

@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'matchers.dart';
library;
import 'dart:ui' as ui;
import 'package:flutter/foundation.dart';

View File

@ -2,6 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'package:flutter/material.dart';
///
/// @docImport 'matchers.dart';
library;
import 'dart:async';
import 'dart:ui' as ui;
import 'dart:ui';

View File

@ -2,6 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'package:flutter/material.dart';
///
/// @docImport 'goldens.dart';
/// @docImport 'widget_tester.dart';
library;
import 'dart:ui' as ui;
import 'package:flutter/foundation.dart';

View File

@ -2,6 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'dart:io';
///
/// @docImport 'controller.dart';
/// @docImport 'test_pointer.dart';
/// @docImport 'widget_tester.dart';
library;
import 'dart:async';
import 'dart:ui' as ui;

View File

@ -2,6 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'package:flutter/scheduler.dart';
///
/// @docImport 'binding.dart';
/// @docImport 'finders.dart';
/// @docImport 'matchers.dart';
/// @docImport 'widget_tester.dart';
library;
import 'package:clock/clock.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';

View File

@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'test_default_binary_messenger.dart';
library;
import 'package:flutter/services.dart';
import 'binding.dart';

View File

@ -2,6 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'package:flutter/material.dart';
///
/// @docImport 'widget_tester.dart';
library;
import 'dart:ui';
import 'package:flutter/material.dart' show Tooltip;

View File

@ -2,6 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'package:flutter/widgets.dart';
///
/// @docImport '_goldens_web.dart';
/// @docImport 'binding.dart';
/// @docImport 'matchers.dart';
/// @docImport 'widget_tester.dart';
library;
import 'dart:typed_data';
import 'dart:ui';
@ -141,7 +149,7 @@ GoldenFileComparator goldenFileComparator = const TrivialComparator._();
/// fake async constraints that are normally imposed on widget tests (i.e. the
/// need or the ability to call [WidgetTester.pump] to advance the microtask
/// queue). Prior to the invocation, the test framework will render only the
/// [widgets.Element] to be compared on the screen.
/// [Element] to be compared on the screen.
///
/// See also:
///

View File

@ -2,6 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'package:fake_async/fake_async.dart';
///
/// @docImport 'widget_tester.dart';
/// @docImport 'test_compat.dart';
library;
import 'dart:async';
import 'dart:typed_data';
import 'dart:ui' as ui;

View File

@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport '_goldens_io.dart';
library;
import 'dart:math' as math;
import 'dart:ui' as ui;

View File

@ -2,6 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'package:flutter/material.dart';
///
/// @docImport 'matchers.dart';
library;
import 'dart:ui' as ui show Image, Paragraph;
import 'package:flutter/foundation.dart';

View File

@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'package:flutter/foundation.dart';
library;
import 'dart:io';
/// Whether the test is running in a web browser compiled to JavaScript or WebAssembly.

View File

@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'mock_canvas.dart';
library;
import 'package:flutter/foundation.dart';
import 'package:flutter/rendering.dart';

View File

@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'widget_tester.dart';
library;
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';

View File

@ -4,6 +4,9 @@
// See also test_async_utils.dart which has some stack manipulation code.
/// @docImport 'widget_tester.dart';
library;
import 'package:flutter/foundation.dart';
/// Report call site for `expect()` call. Returns the number of frames that

View File

@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'widget_tester.dart';
library;
import 'dart:async';
import 'package:flutter/foundation.dart';

View File

@ -2,6 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'package:test_api/backend.dart';
/// @docImport 'package:test_api/scaffolding.dart';
library;
import 'dart:async';
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
@ -285,7 +289,7 @@ Future<void> _tearDownForTestFile() async {
/// A reporter that prints each test on its own line.
///
/// This is currently used in place of [CompactReporter] by `lib/test.dart`,
/// This is currently used in place of `CompactReporter` by `lib/test.dart`,
/// which can't transitively import `dart:io` but still needs access to a runner
/// so that test files can be run directly. This means that until issue 6943 is
/// fixed, this must not import `dart:io`.

View File

@ -2,6 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'dart:ui';
///
/// @docImport 'controller.dart';
/// @docImport 'widget_tester.dart';
library;
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';

View File

@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'widget_tester.dart';
library;
import 'dart:async';
import 'package:flutter/foundation.dart';

View File

@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'package:flutter/animation.dart';
library;
import 'package:flutter/scheduler.dart';
/// A [TickerProvider] that creates a standalone ticker.

View File

@ -2,6 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'package:fake_async/fake_async.dart';
/// @docImport 'package:flutter/material.dart';
/// @docImport 'package:matcher/matcher.dart';
/// @docImport 'package:test_api/hooks.dart';
library;
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';

View File

@ -2,6 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'package:flutter/material.dart';
///
/// @docImport 'binding.dart';
/// @docImport 'widget_tester.dart';
library;
import 'dart:ui' hide window;
import 'package:flutter/foundation.dart';