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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * This library contains an Expect class with static methods that can be used 6 * This library contains an Expect class with static methods that can be used
7 * for simple unit-tests. 7 * for simple unit-tests.
8 */ 8 */
9 library expect; 9 library expect;
10 10
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 bool _identical(a, b) => identical(a, b); 389 bool _identical(a, b) => identical(a, b);
390 390
391 typedef bool _CheckExceptionFn(exception); 391 typedef bool _CheckExceptionFn(exception);
392 typedef _Nullary(); // Expect.throws argument must be this type. 392 typedef _Nullary(); // Expect.throws argument must be this type.
393 393
394 class ExpectException implements Exception { 394 class ExpectException implements Exception {
395 ExpectException(this.message); 395 ExpectException(this.message);
396 String toString() => message; 396 String toString() => message;
397 String message; 397 String message;
398 } 398 }
399
400 /// 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
401 /// declarations to disable inlining of the annotated method.
402 class NoInlining {
403 const NoInlining();
404 }
405
406 /// Annotation class for testing of dart2js. Use this as metadata on method
407 /// declarations to make the type inferrer trust the parameter and return types,
408 /// effectively asserting the runtime values will (at least) be subtypes of the
409 /// annotated types.
410 class TrustTypeAnnotations {
411 const TrustTypeAnnotations();
412 }
413
414 /// Annotation class for testing of dart2js. Use this as metadata on method
415 /// declarations to disable closed world assumptions on parameters, effectively
416 /// assuming that the runtime arguments could be any value.
417 class AssumeDynamic {
418 const AssumeDynamic();
419 }
OLDNEW
« 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