theatre_test library

Classes

StageTester<T extends Stage>

Extensions

TheatreFinds on CommonFinders

Functions

closeToVector(num x, num y, {double epsilon = 1e-15}) Matcher
Returns a matcher which checks if the argument is a vector within distance epsilon of point (x, y). For example:
testRandom(String name, void body(Random random), {int? seed, String? testOn, Timeout? timeout, dynamic skip, dynamic tags, Map<String, dynamic>? onPlatform, int? retry, int repeatCount = 1}) → void
This function is equivalent to test(name, body), except that it is better suited for randomized testing: it will create a Random generator and pass it to the test body, but also record the seed that was used for creating the random generator. Thus, if a test fails for a specific rare seed, it would be easy to reproduce this failure.
testWidgetsRandom(String description, TestWidgetsCallback callback, {int? seed, bool? skip, Timeout? timeout, bool semanticsEnabled = true, dynamic tags}) → void
This function is equivalent to testWidgets(name, body), except that it is better suited for randomized testing: it will create a Random generator and pass it to the test body, but also record the seed that was used for creating the random generator. Thus, if a test fails for a specific rare seed, it would be easy to reproduce this failure.

Typedefs

PumpWidgetFunction<T extends Stage> = Future<void> Function(StageWidget<T>, WidgetTester tester)
StageCreateFunction<T extends Stage> = T Function()
StageWidgetCreateFunction<T extends Stage> = StageWidget<T> Function(T stage)
TestWidgetsCallback = Future<void> Function(Random random, WidgetTester widgetTester)
VerifyFunction<T extends Stage> = dynamic Function(T)
WidgetSetupFunction<T extends Stage> = Future<void> Function(T, WidgetTester)
WidgetVerifyFunction<T extends Stage> = Future<void> Function(T, WidgetTester)