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

Side by Side Diff: pkg/unittest/test/matchers_test.dart

Issue 11090016: Change core lib, dart2js, and more for new optional parameters syntax (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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
« no previous file with comments | « pkg/unittest/core_matchers.dart ('k') | pkg/unittest/test/mock_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #library('matcherTest'); 5 #library('matcherTest');
6 #import('../../../pkg/unittest/unittest.dart'); 6 #import('../../../pkg/unittest/unittest.dart');
7 #source('test_utils.dart'); 7 #source('test_utils.dart');
8 8
9 doesNotThrow() {} 9 doesNotThrow() {}
10 doesThrow() { throw 'X'; } 10 doesThrow() { throw 'X'; }
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 test('allOf', () { 510 test('allOf', () {
511 shouldPass(1, allOf([lessThan(10), greaterThan(0)])); 511 shouldPass(1, allOf([lessThan(10), greaterThan(0)]));
512 shouldFail(-1, allOf([lessThan(10), greaterThan(0)]), 512 shouldFail(-1, allOf([lessThan(10), greaterThan(0)]),
513 "Expected: (a value less than <10> and a value greater than <0>) " 513 "Expected: (a value less than <10> and a value greater than <0>) "
514 "but: a value greater than <0> was <-1>."); 514 "but: a value greater than <0> was <-1>.");
515 }); 515 });
516 }); 516 });
517 517
518 group('Predicate Matchers', () { 518 group('Predicate Matchers', () {
519 test('isInstanceOf', () { 519 test('isInstanceOf', () {
520 shouldFail(0, predicate((x) => x is String, "an instance of String"), 520 shouldFail(0, predicate((x) => x is String,
521 "Expected: an instance of String but: was <0>."); 521 description: "an instance of String"),
522 shouldPass('cow', predicate((x) => x is String, "an instance of String")); 522 "Expected: an instance of String but: was <0>.");
523 shouldPass('cow', predicate((x) => x is String,
524 description: "an instance of String"));
523 }); 525 });
524 }); 526 });
525 } 527 }
526 528
OLDNEW
« no previous file with comments | « pkg/unittest/core_matchers.dart ('k') | pkg/unittest/test/mock_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698