diff --git a/pkg/meta/lib/meta.dart b/pkg/meta/lib/meta.dart index 3e8395e9920..ea23c35ec54 100644 --- a/pkg/meta/lib/meta.dart +++ b/pkg/meta/lib/meta.dart @@ -105,6 +105,22 @@ const _Factory factory = const _Factory(); /// class that has this annotation is not immutable. const Immutable immutable = const Immutable(); +/// Used to annotate a test framework function that runs a single test. +/// +/// Tools, such as IDEs, can show invocations of such function in a file +/// structure view to help the user navigating in large test files. +/// +/// The first parameter of the function must be the description of the test. +const _IsTest isTest = const _IsTest(); + +/// Used to annotate a test framework function that runs a group of tests. +/// +/// Tools, such as IDEs, can show invocations of such function in a file +/// structure view to help the user navigating in large test files. +/// +/// The first parameter of the function must be the description of the group. +const _IsTestGroup isTestGroup = const _IsTestGroup(); + /// Used to annotate a const constructor `c`. Indicates that any invocation of /// the constructor must use the keyword `const` unless one or more of the /// arguments to the constructor is not a compile-time constant. @@ -244,6 +260,14 @@ class _Factory { const _Factory(); } +class _IsTest { + const _IsTest(); +} + +class _IsTestGroup { + const _IsTestGroup(); +} + class _Literal { const _Literal(); }