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

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

Issue 807193003: Re-apply "Remove unittest and matcher from the repo." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 6 years 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/prints_matcher_test.dart ('k') | pkg/matcher/test/test_common.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/matcher/test/string_matchers_test.dart
diff --git a/pkg/matcher/test/string_matchers_test.dart b/pkg/matcher/test/string_matchers_test.dart
deleted file mode 100644
index ba96713cda03312978f0c6443d9bc2b7a81f495b..0000000000000000000000000000000000000000
--- a/pkg/matcher/test/string_matchers_test.dart
+++ /dev/null
@@ -1,101 +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.
-
-library matcher.string_matchers_test;
-
-import 'package:matcher/matcher.dart';
-import 'package:unittest/unittest.dart' show test, group;
-
-import 'test_utils.dart';
-
-void main() {
- initUtils();
-
- test('collapseWhitespace', () {
- var source = '\t\r\n hello\t\r\n world\r\t \n';
- expect(collapseWhitespace(source), 'hello world');
- });
-
- test('isEmpty', () {
- shouldPass('', isEmpty);
- shouldFail(null, isEmpty, "Expected: empty Actual: <null>");
- shouldFail(0, isEmpty, "Expected: empty Actual: <0>");
- shouldFail('a', isEmpty, "Expected: empty Actual: 'a'");
- });
-
- test('isNotEmpty', () {
- shouldFail('', isNotEmpty, "Expected: non-empty Actual: ''");
- shouldFail(null, isNotEmpty, "Expected: non-empty Actual: <null>");
- shouldFail(0, isNotEmpty, "Expected: non-empty Actual: <0>");
- shouldPass('a', isNotEmpty);
- });
-
- test('equalsIgnoringCase', () {
- shouldPass('hello', equalsIgnoringCase('HELLO'));
- shouldFail('hi', equalsIgnoringCase('HELLO'),
- "Expected: 'HELLO' ignoring case Actual: 'hi'");
- });
-
- test('equalsIgnoringWhitespace', () {
- shouldPass(' hello world ', equalsIgnoringWhitespace('hello world'));
- shouldFail(' helloworld ', equalsIgnoringWhitespace('hello world'),
- "Expected: 'hello world' ignoring whitespace "
- "Actual: ' helloworld ' "
- "Which: is 'helloworld' with whitespace compressed");
- });
-
- test('startsWith', () {
- shouldPass('hello', startsWith(''));
- shouldPass('hello', startsWith('hell'));
- shouldPass('hello', startsWith('hello'));
- shouldFail('hello', startsWith('hello '),
- "Expected: a string starting with 'hello ' "
- "Actual: 'hello'");
- });
-
- test('endsWith', () {
- shouldPass('hello', endsWith(''));
- shouldPass('hello', endsWith('lo'));
- shouldPass('hello', endsWith('hello'));
- shouldFail('hello', endsWith(' hello'),
- "Expected: a string ending with ' hello' "
- "Actual: 'hello'");
- });
-
- test('contains', () {
- shouldPass('hello', contains(''));
- shouldPass('hello', contains('h'));
- shouldPass('hello', contains('o'));
- shouldPass('hello', contains('hell'));
- shouldPass('hello', contains('hello'));
- shouldFail('hello', contains(' '),
- "Expected: contains ' ' Actual: 'hello'");
- });
-
- test('stringContainsInOrder', () {
- shouldPass('goodbye cruel world', stringContainsInOrder(['']));
- shouldPass('goodbye cruel world', stringContainsInOrder(['goodbye']));
- shouldPass('goodbye cruel world', stringContainsInOrder(['cruel']));
- shouldPass('goodbye cruel world', stringContainsInOrder(['world']));
- shouldPass('goodbye cruel world',
- stringContainsInOrder(['good', 'bye', 'world']));
- shouldPass('goodbye cruel world',
- stringContainsInOrder(['goodbye', 'cruel']));
- shouldPass('goodbye cruel world',
- stringContainsInOrder(['cruel', 'world']));
- shouldPass('goodbye cruel world',
- stringContainsInOrder(['goodbye', 'cruel', 'world']));
- shouldFail('goodbye cruel world',
- stringContainsInOrder(['goo', 'cruel', 'bye']),
- "Expected: a string containing 'goo', 'cruel', 'bye' in order "
- "Actual: 'goodbye cruel world'");
- });
-
- test('matches', () {
- shouldPass('c0d', matches('[a-z][0-9][a-z]'));
- shouldPass('c0d', matches(new RegExp('[a-z][0-9][a-z]')));
- shouldFail('cOd', matches('[a-z][0-9][a-z]'),
- "Expected: match '[a-z][0-9][a-z]' Actual: 'cOd'");
- });
-}
« no previous file with comments | « pkg/matcher/test/prints_matcher_test.dart ('k') | pkg/matcher/test/test_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698