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

Unified Diff: pkg/matcher/test/core_matchers_test.dart

Issue 332663002: pkg/matcher: add isNaN and isNotNaN matchers (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removing parens Created 6 years, 5 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 | « pkg/matcher/pubspec.yaml ('k') | tests/lib/math/point_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/matcher/test/core_matchers_test.dart
diff --git a/pkg/matcher/test/core_matchers_test.dart b/pkg/matcher/test/core_matchers_test.dart
index 7e9b246d0cd4f231e3881c9884bb997a767151b6..cfeddbe9ddb5e4254349f8ffd5e0b684b308cc9e 100644
--- a/pkg/matcher/test/core_matchers_test.dart
+++ b/pkg/matcher/test/core_matchers_test.dart
@@ -33,6 +33,16 @@ void main() {
shouldFail(null, isNotNull, "Expected: not null Actual: <null>");
});
+ test('isNaN', () {
+ shouldPass(double.NAN, isNaN);
+ shouldFail(3.1, isNaN, "Expected: NaN Actual: <3.1>");
+ });
+
+ test('isNotNaN', () {
+ shouldPass(3.1, isNotNaN);
+ shouldFail(double.NAN, isNotNaN, "Expected: not NaN Actual: <NaN>");
+ });
+
test('same', () {
var a = new Map();
var b = new Map();
« no previous file with comments | « pkg/matcher/pubspec.yaml ('k') | tests/lib/math/point_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698