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

Side by Side Diff: pkg/gcloud/test/datastore/error_matchers.dart

Issue 804973002: Add appengine/gcloud/mustache dependencies. (Closed) Base URL: git@github.com:dart-lang/pub-dartlang-dart.git@master
Patch Set: Added AUTHORS/LICENSE/PATENTS files Created 6 years 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
« no previous file with comments | « pkg/gcloud/test/datastore/e2e/utils.dart ('k') | pkg/gcloud/test/db/e2e/db_test_impl.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
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.
4
5 library error_matchers;
6
7 import 'package:unittest/unittest.dart';
8 import 'package:gcloud/datastore.dart';
9
10 class _ApplicationError extends TypeMatcher {
11 const _ApplicationError() : super("ApplicationError");
12 bool matches(item, Map matchState) => item is ApplicationError;
13 }
14
15
16 class _DataStoreError extends TypeMatcher {
17 const _DataStoreError() : super("DataStoreError");
18 bool matches(item, Map matchState) => item is DatastoreError;
19 }
20
21 class _TransactionAbortedError extends TypeMatcher {
22 const _TransactionAbortedError() : super("TransactionAbortedError");
23 bool matches(item, Map matchState) => item is TransactionAbortedError;
24 }
25
26 class _NeedIndexError extends TypeMatcher {
27 const _NeedIndexError() : super("NeedIndexError");
28 bool matches(item, Map matchState) => item is NeedIndexError;
29 }
30
31 class _TimeoutError extends TypeMatcher {
32 const _TimeoutError() : super("TimeoutError");
33 bool matches(item, Map matchState) => item is TimeoutError;
34 }
35
36
37 class _IntMatcher extends TypeMatcher {
38 const _IntMatcher() : super("IntMatcher");
39 bool matches(item, Map matchState) => item is int;
40 }
41
42 const isApplicationError = const _ApplicationError();
43
44 const isDataStoreError = const _DataStoreError();
45 const isTransactionAbortedError = const _TransactionAbortedError();
46 const isNeedIndexError = const _NeedIndexError();
47 const isTimeoutError = const _TimeoutError();
48
49 const isInt = const _IntMatcher();
OLDNEW
« no previous file with comments | « pkg/gcloud/test/datastore/e2e/utils.dart ('k') | pkg/gcloud/test/db/e2e/db_test_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698