docImports for flutter_test (#151189)
Part of https://github.com/flutter/flutter/issues/150800 Issues encountered:
This commit is contained in:
parent
46030f1eff
commit
cfa7777f7a
@ -51,6 +51,12 @@
|
|||||||
/// * [debugCheckIntrinsicSizes], which can be set in a
|
/// * [debugCheckIntrinsicSizes], which can be set in a
|
||||||
/// `flutter_test_config.dart` file to enable deeper [RenderBox]
|
/// `flutter_test_config.dart` file to enable deeper [RenderBox]
|
||||||
/// tests of the intrinsic APIs automatically while laying out widgets.
|
/// 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;
|
library flutter_test;
|
||||||
|
|
||||||
export 'dart:async' show Future;
|
export 'dart:async' show Future;
|
||||||
|
@ -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 {
|
class _MockHttpRequest implements HttpClientRequest {
|
||||||
@override
|
@override
|
||||||
bool bufferOutput = true;
|
bool bufferOutput = true;
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
/// @docImport 'matchers.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'dart:math' as math;
|
import 'dart:math' as math;
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
/// @docImport 'matchers.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:js_interop';
|
import 'dart:js_interop';
|
||||||
import 'dart:typed_data';
|
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
|
/// * [matchesGoldenFile], the function from [flutter_test] that invokes the
|
||||||
/// comparator.
|
/// comparator.
|
||||||
class DefaultWebGoldenComparator extends WebGoldenComparator {
|
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
|
/// 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);
|
DefaultWebGoldenComparator(this.testUri);
|
||||||
|
|
||||||
/// The test file currently being executed.
|
/// The test file currently being executed.
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
/// @docImport 'matchers.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'dart:typed_data';
|
import 'dart:typed_data';
|
||||||
import 'dart:ui' as ui;
|
import 'dart:ui' as ui;
|
||||||
|
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
/// @docImport 'matchers.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'dart:ui' as ui;
|
import 'dart:ui' as ui;
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
|
@ -2,6 +2,11 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
/// @docImport 'package:flutter/material.dart';
|
||||||
|
///
|
||||||
|
/// @docImport 'matchers.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:ui' as ui;
|
import 'dart:ui' as ui;
|
||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
|
@ -2,6 +2,12 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
/// @docImport 'package:flutter/material.dart';
|
||||||
|
///
|
||||||
|
/// @docImport 'goldens.dart';
|
||||||
|
/// @docImport 'widget_tester.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'dart:ui' as ui;
|
import 'dart:ui' as ui;
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
|
@ -2,6 +2,13 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// 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:async';
|
||||||
import 'dart:ui' as ui;
|
import 'dart:ui' as ui;
|
||||||
|
|
||||||
|
@ -2,6 +2,14 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// 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:clock/clock.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/gestures.dart';
|
import 'package:flutter/gestures.dart';
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
/// @docImport 'test_default_binary_messenger.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
import 'binding.dart';
|
import 'binding.dart';
|
||||||
|
@ -2,6 +2,11 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
/// @docImport 'package:flutter/material.dart';
|
||||||
|
///
|
||||||
|
/// @docImport 'widget_tester.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
|
|
||||||
import 'package:flutter/material.dart' show Tooltip;
|
import 'package:flutter/material.dart' show Tooltip;
|
||||||
|
@ -2,6 +2,14 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// 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:typed_data';
|
||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
|
|
||||||
@ -141,7 +149,7 @@ GoldenFileComparator goldenFileComparator = const TrivialComparator._();
|
|||||||
/// fake async constraints that are normally imposed on widget tests (i.e. the
|
/// 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
|
/// need or the ability to call [WidgetTester.pump] to advance the microtask
|
||||||
/// queue). Prior to the invocation, the test framework will render only the
|
/// 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:
|
/// See also:
|
||||||
///
|
///
|
||||||
|
@ -2,6 +2,12 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// 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:async';
|
||||||
import 'dart:typed_data';
|
import 'dart:typed_data';
|
||||||
import 'dart:ui' as ui;
|
import 'dart:ui' as ui;
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
/// @docImport '_goldens_io.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'dart:math' as math;
|
import 'dart:math' as math;
|
||||||
import 'dart:ui' as ui;
|
import 'dart:ui' as ui;
|
||||||
|
|
||||||
|
@ -2,6 +2,11 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
/// @docImport 'package:flutter/material.dart';
|
||||||
|
///
|
||||||
|
/// @docImport 'matchers.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'dart:ui' as ui show Image, Paragraph;
|
import 'dart:ui' as ui show Image, Paragraph;
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
/// @docImport 'package:flutter/foundation.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
/// Whether the test is running in a web browser compiled to JavaScript or WebAssembly.
|
/// Whether the test is running in a web browser compiled to JavaScript or WebAssembly.
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
/// @docImport 'mock_canvas.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
|
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
/// @docImport 'widget_tester.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
|
@ -4,6 +4,9 @@
|
|||||||
|
|
||||||
// See also test_async_utils.dart which has some stack manipulation code.
|
// See also test_async_utils.dart which has some stack manipulation code.
|
||||||
|
|
||||||
|
/// @docImport 'widget_tester.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
/// Report call site for `expect()` call. Returns the number of frames that
|
/// Report call site for `expect()` call. Returns the number of frames that
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
/// @docImport 'widget_tester.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
/// @docImport 'package:test_api/backend.dart';
|
||||||
|
/// @docImport 'package:test_api/scaffolding.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
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.
|
/// 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
|
/// 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
|
/// so that test files can be run directly. This means that until issue 6943 is
|
||||||
/// fixed, this must not import `dart:io`.
|
/// fixed, this must not import `dart:io`.
|
||||||
|
@ -2,6 +2,12 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
/// @docImport 'dart:ui';
|
||||||
|
///
|
||||||
|
/// @docImport 'controller.dart';
|
||||||
|
/// @docImport 'widget_tester.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/gestures.dart';
|
import 'package:flutter/gestures.dart';
|
||||||
|
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
/// @docImport 'widget_tester.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
/// @docImport 'package:flutter/animation.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'package:flutter/scheduler.dart';
|
import 'package:flutter/scheduler.dart';
|
||||||
|
|
||||||
/// A [TickerProvider] that creates a standalone ticker.
|
/// A [TickerProvider] that creates a standalone ticker.
|
||||||
|
@ -2,6 +2,12 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// 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/cupertino.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/gestures.dart';
|
import 'package:flutter/gestures.dart';
|
||||||
|
@ -2,6 +2,12 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
/// @docImport 'package:flutter/material.dart';
|
||||||
|
///
|
||||||
|
/// @docImport 'binding.dart';
|
||||||
|
/// @docImport 'widget_tester.dart';
|
||||||
|
library;
|
||||||
|
|
||||||
import 'dart:ui' hide window;
|
import 'dart:ui' hide window;
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user