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

Unified Diff: samples/tests/samples/lib/util/util_test.dart

Issue 23717003: Reorganize tests for samples so the test is discoverable from the sample (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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
Index: samples/tests/samples/lib/util/util_test.dart
diff --git a/samples/tests/samples/lib/util/util_test.dart b/samples/tests/samples/lib/util/util_test.dart
deleted file mode 100644
index c6fd0ef4110b16bbf7ecf8659f946a3dd0521cc2..0000000000000000000000000000000000000000
--- a/samples/tests/samples/lib/util/util_test.dart
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) 2011, 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 util_tests;
-
-import 'dart:html';
-import '../../../../../pkg/unittest/lib/unittest.dart';
-import '../../../../../pkg/unittest/lib/html_config.dart';
-import '../../../../swarm/swarm_ui_lib/util/utilslib.dart';
-
-main() {
- useHtmlConfiguration();
- test('insertAt', () {
- var a = [];
- CollectionUtils.insertAt(a, 0, 1);
- expect(a, orderedEquals([1]));
-
- CollectionUtils.insertAt(a, 0, 2);
- expect(a, orderedEquals([2, 1]));
-
- CollectionUtils.insertAt(a, 0, 5);
- CollectionUtils.insertAt(a, 0, 4);
- CollectionUtils.insertAt(a, 0, 3);
- expect(a, orderedEquals([3, 4, 5, 2, 1]));
-
- a = [];
- CollectionUtils.insertAt(a, 0, 1);
- expect(a, orderedEquals([1]));
-
- CollectionUtils.insertAt(a, 1, 2);
- expect(a, orderedEquals([1, 2]));
-
- CollectionUtils.insertAt(a, 1, 3);
- CollectionUtils.insertAt(a, 3, 4);
- CollectionUtils.insertAt(a, 3, 5);
- expect(a, orderedEquals([1, 3, 2, 5, 4]));
- });
-
- test('defaultString', () {
- expect(StringUtils.defaultString(null), isEmpty);
- expect(StringUtils.defaultString(''), isEmpty);
- expect(StringUtils.defaultString('test'), equals('test'));
- });
-}

Powered by Google App Engine
This is Rietveld 408576698