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

Unified Diff: test/pretty_print_minified_test.dart

Issue 919983003: Get rid of minified tests. (Closed) Base URL: git@github.com:dart-lang/matcher@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/minified_test.dart ('k') | test/pretty_print_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/pretty_print_minified_test.dart
diff --git a/test/pretty_print_minified_test.dart b/test/pretty_print_minified_test.dart
deleted file mode 100644
index 9eb6d764b2cde863eecf230b8a12ba7d8831abd5..0000000000000000000000000000000000000000
--- a/test/pretty_print_minified_test.dart
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// This file is for pretty-print tests that rely on the names of various Dart
-// types. These tests normally fail when run in minified dart2js, since the
-// names will be mangled. This version of the file is modified to expect
-// minified names.
-
-library matcher.print_minified_test;
-
-import 'dart:collection';
-
-import 'package:matcher/matcher.dart';
-import 'package:matcher/src/pretty_print.dart';
-import 'package:unittest/unittest.dart' show test, group, expect;
-
-class DefaultToString {}
-
-class CustomToString {
- String toString() => "string representation";
-}
-
-class _PrivateName {
- String toString() => "string representation";
-}
-
-class _PrivateNameIterable extends IterableMixin {
- Iterator get iterator => [1, 2, 3].iterator;
-}
-
-// A regexp fragment matching a minified name.
-final _minifiedName = r"[A-Za-z0-9]{1,3}";
-
-void main() {
- group('with an object', () {
- test('with a default [toString]', () {
- expect(prettyPrint(new DefaultToString()),
- matches(r"<Instance of '" + _minifiedName + r"'>"));
- });
-
- test('with a custom [toString]', () {
- expect(prettyPrint(new CustomToString()),
- matches(_minifiedName + r':<string representation>'));
- });
-
- test('with a custom [toString] and a private name', () {
- expect(prettyPrint(new _PrivateName()),
- matches(_minifiedName + r':<string representation>'));
- });
- });
-
- 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\]"));
- });
-
- 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 | « test/minified_test.dart ('k') | test/pretty_print_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698