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

Unified Diff: corelib/src/expect.dart

Issue 8400038: Use strict equality when comparing with null, especially when null is a default value. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | corelib/src/implementation/future_implementation.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: corelib/src/expect.dart
===================================================================
--- corelib/src/expect.dart (revision 855)
+++ corelib/src/expect.dart (working copy)
@@ -74,7 +74,7 @@
num actual,
[num tolerance = null,
String reason = null]) {
- if (tolerance == null) {
+ if (tolerance === null) {
tolerance = (expected / Math.pow(10.0, 4.0)).abs();
}
// Note: use !( <= ) rather than > so we fail on NaNs
@@ -242,7 +242,7 @@
}
static String _getMessage(String reason)
- => (reason == null) ? "" : ", '$reason'";
+ => (reason === null) ? "" : ", '$reason'";
static void _fail(String message) {
throw new ExpectException(message);
« no previous file with comments | « no previous file | corelib/src/implementation/future_implementation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698