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

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

Issue 306283002: pkg/matcher: cleanup, updates, deprecations, fixes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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
Index: pkg/matcher/test/operator_matchers_test.dart
diff --git a/pkg/matcher/test/operator_matchers_test.dart b/pkg/matcher/test/operator_matchers_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..fd9627a71a5afcc13f395cdd93613fd96c3e15f1
--- /dev/null
+++ b/pkg/matcher/test/operator_matchers_test.dart
@@ -0,0 +1,28 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library matcher.operator_matchers_test;
+
+import 'package:matcher/matcher.dart';
+import 'package:unittest/unittest.dart' show test, group;
+
+import 'test_utils.dart';
+
+void main() {
+ initUtils();
+
+ test('anyOf', () {
+ shouldFail(0, anyOf([equals(1), equals(2)]),
+ "Expected: (<1> or <2>) Actual: <0>");
+ shouldPass(1, anyOf([equals(1), equals(2)]));
+ });
+
+ test('allOf', () {
+ shouldPass(1, allOf([lessThan(10), greaterThan(0)]));
+ shouldFail(-1, allOf([lessThan(10), greaterThan(0)]),
+ "Expected: (a value less than <10> and a value greater than <0>) "
+ "Actual: <-1> "
+ "Which: is not a value greater than <0>");
+ });
+}

Powered by Google App Engine
This is Rietveld 408576698