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

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

Issue 903753002: Add test annotations to package:expect (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update use_unused_api.dart Created 5 years, 10 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 | « pkg/compiler/lib/src/use_unused_api.dart ('k') | tests/compiler/dart2js/expect_annotations_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/expect/lib/expect.dart
diff --git a/pkg/expect/lib/expect.dart b/pkg/expect/lib/expect.dart
index bdec706763f8a6d8cba179b53933e4d446913eb6..ed094ddb49ce8378181f8fc3b40e3c225d807b08 100644
--- a/pkg/expect/lib/expect.dart
+++ b/pkg/expect/lib/expect.dart
@@ -396,3 +396,24 @@ class ExpectException implements Exception {
String toString() => message;
String message;
}
+
+/// Annotation class for testing of dart2js. Use this as metadata on method
sra1 2015/02/13 20:37:38 This is a strange place for these annotations. Eve
floitsch 2015/02/13 20:58:45 :( Didn't know/forgot about js_lib/annotations.dar
floitsch 2015/02/13 21:19:55 Thinking more about it: What would be the advantag
+/// declarations to disable inlining of the annotated method.
+class NoInlining {
+ const NoInlining();
+}
+
+/// Annotation class for testing of dart2js. Use this as metadata on method
+/// declarations to make the type inferrer trust the parameter and return types,
+/// effectively asserting the runtime values will (at least) be subtypes of the
+/// annotated types.
+class TrustTypeAnnotations {
+ const TrustTypeAnnotations();
+}
+
+/// Annotation class for testing of dart2js. Use this as metadata on method
+/// declarations to disable closed world assumptions on parameters, effectively
+/// assuming that the runtime arguments could be any value.
+class AssumeDynamic {
+ const AssumeDynamic();
+}
« no previous file with comments | « pkg/compiler/lib/src/use_unused_api.dart ('k') | tests/compiler/dart2js/expect_annotations_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698