Index: pkg/meta/lib/meta.dart |
diff --git a/pkg/meta/lib/meta.dart b/pkg/meta/lib/meta.dart |
index 99a3924683d74e9aa7e2014f28350b92e86d901c..a9424f9536c996b1dc40ec1d261ea211d70f1ca3 100644 |
--- a/pkg/meta/lib/meta.dart |
+++ b/pkg/meta/lib/meta.dart |
@@ -97,6 +97,18 @@ const _Protected protected = const _Protected(); |
/// corresponding to a named parameter that has this annotation. |
const Required required = const Required(); |
+/// Used to annotate a declaration was made public, so that it is more visible |
+/// than otherwise necessary, to make code testable. |
+/// |
+/// Tools, such as the analyzer, can provide feedback if |
+/// |
+/// * the annotation is associated with a declaration not in the `lib` folder |
+/// of a package; |
+/// or |
+/// * the declaration is referenced outside of its the defining library or a |
+/// library which is in the `test` folder of the defining package. |
+const _VisibleForTesting visibleForTesting = const _VisibleForTesting(); |
+ |
/// Used to annotate a named parameter `p` in a method or function `f`. |
/// |
/// See [required] for more details. |
@@ -135,3 +147,7 @@ class _OptionalTypeArgs { |
class _Protected { |
const _Protected(); |
} |
+ |
+class _VisibleForTesting { |
+ const _VisibleForTesting(); |
+} |