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

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

Issue 15492003: Split out unittest tests whose behavior differs in minified mode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes. Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/pkg.status ('k') | pkg/unittest/test/matchers_minified_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
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 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 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 unittestTests; 5 library unittestTests;
6 import 'package:unittest/unittest.dart'; 6 import 'package:unittest/unittest.dart';
7 7
8 part 'test_utils.dart'; 8 import 'test_utils.dart';
9
10 doesThrow() { throw 'X'; }
11 9
12 main() { 10 main() {
13 initUtils(); 11 initUtils();
14 12
15 group('Type Matchers', () { 13 group('Type Matchers', () {
16 test('isInstanceOf', () { 14 test('isInstanceOf', () {
17 shouldFail(0, new isInstanceOf<String>('String'), 15 shouldFail(0, new isInstanceOf<String>('String'),
18 "Expected: an instance of String But: was <0>."); 16 "Expected: an instance of String But: was <0>.");
19 shouldPass('cow', new isInstanceOf<String>('String')); 17 shouldPass('cow', new isInstanceOf<String>('String'));
20 }); 18 });
21 19
22 test('throwsA', () { 20 test('throwsA', () {
23 shouldPass(doesThrow, throwsA(equals('X'))); 21 shouldPass(doesThrow, throwsA(equals('X')));
24 shouldFail(doesThrow, throwsA(equals('Y')), 22 shouldFail(doesThrow, throwsA(equals('Y')),
25 "Expected: throws an exception which matches 'Y' " 23 "Expected: throws an exception which matches 'Y' "
26 "But: exception 'X' does not match 'Y'. " 24 "But: exception 'X' does not match 'Y'. "
27 "Actual: <Closure: (dynamic) => dynamic " 25 "Actual: <Closure: (dynamic) => dynamic "
28 "from Function 'doesThrow': static.>"); 26 "from Function 'doesThrow': static.>");
29 }); 27 });
30 }); 28 });
31 } 29 }
32 30
OLDNEW
« no previous file with comments | « pkg/pkg.status ('k') | pkg/unittest/test/matchers_minified_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698