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

Unified Diff: pkg/matcher/test/pretty_print_minified_test.dart

Issue 199793010: pkg/matcher: test cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: nits Created 6 years, 9 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/matcher/test/mirror_matchers_test.dart ('k') | pkg/matcher/test/pretty_print_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/matcher/test/pretty_print_minified_test.dart
diff --git a/pkg/matcher/test/pretty_print_minified_test.dart b/pkg/matcher/test/pretty_print_minified_test.dart
index 07583598f79e4d949fad545d051b5e206f28ebed..f1107f7dcf0e14a2dad909bb7c1d930c1886998a 100644
--- a/pkg/matcher/test/pretty_print_minified_test.dart
+++ b/pkg/matcher/test/pretty_print_minified_test.dart
@@ -7,12 +7,13 @@
// names will be mangled. This version of the file is modified to expect
// minified names.
-import 'dart:collection';
+library matcher.print_minified_test;
-import 'package:unittest/unittest.dart' as ut;
+import 'dart:collection';
import 'package:matcher/matcher.dart';
import 'package:matcher/src/pretty_print.dart';
+import 'package:unittest/unittest.dart' show test, group;
class DefaultToString {}
@@ -32,30 +33,30 @@ class _PrivateNameIterable extends IterableMixin {
final _minifiedName = r"[A-Za-z0-9]{1,3}";
void main() {
- ut.group('with an object', () {
- ut.test('with a default [toString]', () {
+ group('with an object', () {
+ test('with a default [toString]', () {
expect(prettyPrint(new DefaultToString()),
matches(r"<Instance of '" + _minifiedName + r"'>"));
});
- ut.test('with a custom [toString]', () {
+ test('with a custom [toString]', () {
expect(prettyPrint(new CustomToString()),
matches(_minifiedName + r':<string representation>'));
});
- ut.test('with a custom [toString] and a private name', () {
+ test('with a custom [toString] and a private name', () {
expect(prettyPrint(new _PrivateName()),
matches(_minifiedName + r':<string representation>'));
});
});
- ut.group('with an iterable', () {
- ut.test("that's not a list", () {
+ group('with an iterable', () {
+ test("that's not a list", () {
expect(prettyPrint([1, 2, 3, 4].map((n) => n * 2)),
matches(_minifiedName + r":\[2, 4, 6, 8\]"));
});
- ut.test("that's not a list and has a private name", () {
+ test("that's not a list and has a private name", () {
expect(prettyPrint(new _PrivateNameIterable()),
matches(_minifiedName + r":\[1, 2, 3\]"));
});
« no previous file with comments | « pkg/matcher/test/mirror_matchers_test.dart ('k') | pkg/matcher/test/pretty_print_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698