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

Side by Side Diff: pkg/unittest/test/instance_test.dart

Issue 319983005: pkg/unittest: test cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 6 years, 6 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 | « pkg/unittest/test/group_name_test.dart ('k') | pkg/unittest/test/invalid_ops_test.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) 2012, 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 unittestTests;
6 import 'package:unittest/unittest.dart';
7
8 import 'test_utils.dart';
9
10 main() {
11 initUtils();
12
13 group('Type Matchers', () {
14 test('isInstanceOf', () {
15 shouldFail(0, new isInstanceOf<String>('String'),
16 "Expected: an instance of String Actual: <0>");
17 shouldPass('cow', new isInstanceOf<String>('String'));
18 });
19
20 test('throwsA', () {
21 shouldPass(doesThrow, throwsA(equals('X')));
22 shouldFail(doesThrow, throwsA(equals('Y')),
23 matches("Expected: throws 'Y'.*"
24 "Actual: <Closure.*"
25 "Which: threw 'X'"));
26 });
27 });
28 }
29
OLDNEW
« no previous file with comments | « pkg/unittest/test/group_name_test.dart ('k') | pkg/unittest/test/invalid_ops_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698