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

Side by Side Diff: pkg/unittest/core_matchers.dart

Issue 10909166: Rename NoSuchMethodException to NoSuchMethodError. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments Created 8 years, 3 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 /** 6 /**
7 * Returns a matcher that matches empty strings, maps or collections. 7 * Returns a matcher that matches empty strings, maps or collections.
8 */ 8 */
9 const Matcher isEmpty = const _Empty(); 9 const Matcher isEmpty = const _Empty();
10 10
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 452
453 /** A matcher for functions that throw IndexOutOfRangeException */ 453 /** A matcher for functions that throw IndexOutOfRangeException */
454 const Matcher throwsIndexOutOfRangeException = 454 const Matcher throwsIndexOutOfRangeException =
455 const _Throws(isIndexOutOfRangeException); 455 const _Throws(isIndexOutOfRangeException);
456 456
457 class _IndexOutOfRangeException extends _ExceptionMatcher { 457 class _IndexOutOfRangeException extends _ExceptionMatcher {
458 const _IndexOutOfRangeException() : super("IndexOutOfRangeException"); 458 const _IndexOutOfRangeException() : super("IndexOutOfRangeException");
459 bool matches(item, MatchState matchState) => item is IndexOutOfRangeException; 459 bool matches(item, MatchState matchState) => item is IndexOutOfRangeException;
460 } 460 }
461 461
462 /** A matcher for NoSuchMethodExceptions. */ 462 /** A matcher for NoSuchMethodErrors. */
463 const isNoSuchMethodException = const _NoSuchMethodException(); 463 const isNoSuchMethodError = const _NoSuchMethodError();
464 464
465 /** A matcher for functions that throw NoSuchMethodException */ 465 /** A matcher for functions that throw NoSuchMethodError */
466 const Matcher throwsNoSuchMethodException = 466 const Matcher throwsNoSuchMethodError =
467 const _Throws(isNoSuchMethodException); 467 const _Throws(isNoSuchMethodError);
468 468
469 class _NoSuchMethodException extends _ExceptionMatcher { 469 class _NoSuchMethodError extends _ExceptionMatcher {
470 const _NoSuchMethodException() : super("NoSuchMethodException"); 470 const _NoSuchMethodError() : super("NoSuchMethodError");
471 bool matches(item, MatchState matchState) => item is NoSuchMethodException; 471 bool matches(item, MatchState matchState) => item is NoSuchMethodError;
472 } 472 }
473 473
474 /** A matcher for NotImplementedExceptions. */ 474 /** A matcher for NotImplementedExceptions. */
475 const isNotImplementedException = const _NotImplementedException(); 475 const isNotImplementedException = const _NotImplementedException();
476 476
477 /** A matcher for functions that throw Exception */ 477 /** A matcher for functions that throw Exception */
478 const Matcher throwsNotImplementedException = 478 const Matcher throwsNotImplementedException =
479 const _Throws(isNotImplementedException); 479 const _Throws(isNotImplementedException);
480 480
481 class _NotImplementedException extends _ExceptionMatcher { 481 class _NotImplementedException extends _ExceptionMatcher {
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 final _matcher; 617 final _matcher;
618 final String _description; 618 final String _description;
619 619
620 const _Predicate(this._matcher, this._description); 620 const _Predicate(this._matcher, this._description);
621 621
622 bool matches(item, MatchState matchState) => _matcher(item); 622 bool matches(item, MatchState matchState) => _matcher(item);
623 623
624 Description describe(Description description) => 624 Description describe(Description description) =>
625 description.add(_description); 625 description.add(_description);
626 } 626 }
OLDNEW
« no previous file with comments | « lib/html/templates/html/impl/impl_Element.darttemplate ('k') | pkg/unittest/test/matchers_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698