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

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

Issue 11368151: Change isFalse to test against false instead of against true. (Issue 6611). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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/lib/src/core_matchers.dart ('k') | no next file » | 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 unittestTests; 5 library unittestTests;
6 import '../../../pkg/unittest/lib/unittest.dart'; 6 import '../../../pkg/unittest/lib/unittest.dart';
7 part 'test_utils.dart'; 7 part 'test_utils.dart';
8 8
9 doesNotThrow() {} 9 doesNotThrow() {}
10 doesThrow() { throw 'X'; } 10 doesThrow() { throw 'X'; }
(...skipping 30 matching lines...) Expand all
41 41
42 group('Core matchers', () { 42 group('Core matchers', () {
43 43
44 test('isTrue', () { 44 test('isTrue', () {
45 shouldPass(true, isTrue); 45 shouldPass(true, isTrue);
46 shouldFail(false, isTrue, "Expected: true but: was <false>."); 46 shouldFail(false, isTrue, "Expected: true but: was <false>.");
47 }); 47 });
48 48
49 test('isFalse', () { 49 test('isFalse', () {
50 shouldPass(false, isFalse); 50 shouldPass(false, isFalse);
51 shouldFail(10, isFalse, "Expected: false but: was <10>.");
51 shouldFail(true, isFalse, "Expected: false but: was <true>."); 52 shouldFail(true, isFalse, "Expected: false but: was <true>.");
52 }); 53 });
53 54
54 test('isNull', () { 55 test('isNull', () {
55 shouldPass(null, isNull); 56 shouldPass(null, isNull);
56 shouldFail(false, isNull, "Expected: null but: was <false>."); 57 shouldFail(false, isNull, "Expected: null but: was <false>.");
57 }); 58 });
58 59
59 test('isNotNull', () { 60 test('isNotNull', () {
60 shouldPass(false, isNotNull); 61 shouldPass(false, isNotNull);
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 var w = new Widget(); 537 var w = new Widget();
537 w.price = 10; 538 w.price = 10;
538 shouldPass(w, new HasPrice(greaterThan(0))); 539 shouldPass(w, new HasPrice(greaterThan(0)));
539 shouldFail(w, new HasPrice(greaterThan(10)), 540 shouldFail(w, new HasPrice(greaterThan(10)),
540 'Expected: Widget with a price that is a value greater than <10> ' 541 'Expected: Widget with a price that is a value greater than <10> '
541 'but: price was <10>.'); 542 'but: price was <10>.');
542 }); 543 });
543 }); 544 });
544 } 545 }
545 546
OLDNEW
« no previous file with comments | « pkg/unittest/lib/src/core_matchers.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698