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

Unified Diff: pkg/typed_mock/test/typed_mock_test.dart

Issue 281943002: Add a top-level typed_mock package. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. 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
« no previous file with comments | « pkg/typed_mock/pubspec.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/typed_mock/test/typed_mock_test.dart
diff --git a/pkg/analysis_server/test/typed_mock_test.dart b/pkg/typed_mock/test/typed_mock_test.dart
similarity index 90%
rename from pkg/analysis_server/test/typed_mock_test.dart
rename to pkg/typed_mock/test/typed_mock_test.dart
index 3b120f53d3484b166aed548c6dd5c9c3ac24c8c5..76add8edad4949912d328e0132e196d1dea18718 100644
--- a/pkg/analysis_server/test/typed_mock_test.dart
+++ b/pkg/typed_mock/test/typed_mock_test.dart
@@ -2,8 +2,8 @@ library test.typed_mock;
import 'package:unittest/unittest.dart';
-import 'typed_mock.dart' hide equals;
-import 'typed_mock.dart' as typed_mocks show equals;
+import 'package:typed_mock/typed_mock.dart' hide equals;
+import 'package:typed_mock/typed_mock.dart' as typed_mocks show equals;
abstract class TestInterface {
@@ -37,39 +37,39 @@ main() {
group('Matchers', () {
test('equals', () {
- expect(typed_mocks.equals(10).match(10), true);
- expect(typed_mocks.equals(10).match(20), false);
- expect(typed_mocks.equals('abc').match('abc'), true);
- expect(typed_mocks.equals('abc').match('xyz'), false);
+ expect(typed_mocks.equals(10).matches(10), true);
+ expect(typed_mocks.equals(10).matches(20), false);
+ expect(typed_mocks.equals('abc').matches('abc'), true);
+ expect(typed_mocks.equals('abc').matches('xyz'), false);
});
test('anyBool', () {
- expect(anyBool.match(true), true);
- expect(anyBool.match(false), true);
- expect(anyBool.match(0), false);
- expect(anyBool.match('0'), false);
+ expect(anyBool.matches(true), true);
+ expect(anyBool.matches(false), true);
+ expect(anyBool.matches(0), false);
+ expect(anyBool.matches('0'), false);
});
test('anyInt', () {
- expect(anyInt.match(true), false);
- expect(anyInt.match(-99), true);
- expect(anyInt.match(0), true);
- expect(anyInt.match(42), true);
- expect(anyInt.match('0'), false);
+ expect(anyInt.matches(true), false);
+ expect(anyInt.matches(-99), true);
+ expect(anyInt.matches(0), true);
+ expect(anyInt.matches(42), true);
+ expect(anyInt.matches('0'), false);
});
test('anyObject', () {
- expect(anyObject.match(true), true);
- expect(anyObject.match(0), true);
- expect(anyObject.match('0'), true);
+ expect(anyObject.matches(true), true);
+ expect(anyObject.matches(0), true);
+ expect(anyObject.matches('0'), true);
});
test('anyString', () {
- expect(anyString.match(true), false);
- expect(anyString.match(0), false);
- expect(anyString.match(''), true);
- expect(anyString.match('0'), true);
- expect(anyString.match('abc'), true);
+ expect(anyString.matches(true), false);
+ expect(anyString.matches(0), false);
+ expect(anyString.matches(''), true);
+ expect(anyString.matches('0'), true);
+ expect(anyString.matches('abc'), true);
});
});
« no previous file with comments | « pkg/typed_mock/pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698