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

Unified Diff: frog/tests/leg/src/LinkTest.dart

Issue 10250002: test rename overhaul: step 5 - frog and leg tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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: frog/tests/leg/src/LinkTest.dart
diff --git a/frog/tests/leg/src/LinkTest.dart b/frog/tests/leg/src/LinkTest.dart
deleted file mode 100644
index 5d8116f28415774f963743b187c961ebc50c2124..0000000000000000000000000000000000000000
--- a/frog/tests/leg/src/LinkTest.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.
-
-#import('../../../../lib/compiler/implementation/util/util.dart');
-#import('../../../../lib/compiler/implementation/util/util_implementation.dart');
-
-main() {
- test(new Link<Comparable>('three').prepend(2).prepend('one'),
- ['one', 2, 'three']);
- test(new Link<Comparable>(3).prepend('two').prepend(1), [1, 'two', 3]);
- test(new Link<String>('single'), ['single']);
- test(new LinkTail(), []);
- testFromList([]);
- testFromList([0]);
- testFromList([0, 1]);
- testFromList([0, 1, 2]);
- testFromList([0, 1, 2, 3]);
- testFromList([0, 1, 2, 3, 4]);
- testFromList([0, 1, 2, 3, 4, 5]);
-}
-
-testFromList(List list) {
- test(new Link.fromList(list), list);
-}
-
-test(Link link, List list) {
- Expect.equals(list.isEmpty(), link.isEmpty());
- int i = 0;
- for (var element in link.toList()) {
- Expect.equals(list[i++], element);
- }
- Expect.equals(list.length, i);
- i = 0;
- for (var element in link) {
- Expect.equals(list[i++], element);
- }
- Expect.equals(list.length, i);
- i = 0;
- for (; !link.isEmpty(); link = link.tail) {
- Expect.equals(list[i++], link.head);
- }
- Expect.equals(list.length, i);
- Expect.isTrue(link.isEmpty());
-}

Powered by Google App Engine
This is Rietveld 408576698