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

Side by Side Diff: utils/tests/pub/error_group_test.dart

Issue 12088056: Fix build for throwsStateError: remove duplicate definitions in other tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « utils/tests/pub/curl_client_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library error_group_test; 5 library error_group_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import '../../../pkg/unittest/lib/unittest.dart'; 9 import '../../../pkg/unittest/lib/unittest.dart';
10 import '../../pub/error_group.dart'; 10 import '../../pub/error_group.dart';
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 expect(stream.toList(), completion(equals(['value1', 'value2']))); 444 expect(stream.toList(), completion(equals(['value1', 'value2'])));
445 controller..add('value1')..add('value2')..close(); 445 controller..add('value1')..add('value2')..close();
446 446
447 expect(stream.toList().then((_) { 447 expect(stream.toList().then((_) {
448 // shouldn't cause a top-level exception 448 // shouldn't cause a top-level exception
449 completer.completeError(new FormatException()); 449 completer.completeError(new FormatException());
450 }), completes); 450 }), completes);
451 }); 451 });
452 }); 452 });
453 } 453 }
454
455 // TODO(nweiz): remove this once it's built in to unittest (issue 7922).
456 /// A matcher for StateErrors.
457 const isStateError = const _StateError();
458
459 /// A matcher for functions that throw StateError.
460 const Matcher throwsStateError =
461 const Throws(isStateError);
462
463 class _StateError extends TypeMatcher {
464 const _StateError() : super("StateError");
465 bool matches(item, MatchState matchState) => item is StateError;
466 }
OLDNEW
« no previous file with comments | « utils/tests/pub/curl_client_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698