Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(397)

Unified Diff: pkg/meta/lib/meta.dart

Issue 2231993002: Add @visibleForTesting annotation to meta. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: tweak Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
+}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698