mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 08:24:39 +00:00
Add @isTest and @isTestGroup to package:meta
R=devoncarew@google.com, paulberry@google.com Bug: https://github.com/flutter/flutter-intellij/issues/2055 Change-Id: I78083783a3e05171746253101b3b10bbdcc8ef99 Reviewed-on: https://dart-review.googlesource.com/53480 Reviewed-by: Paul Berry <paulberry@google.com> Reviewed-by: Devon Carew <devoncarew@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
parent
3fcb85a545
commit
f64ba0cadd
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue