Chromium Code Reviews| Index: tests/corelib/uri_path_test.dart |
| diff --git a/tests/corelib/uri_path_test.dart b/tests/corelib/uri_path_test.dart |
| index 058d91237add29398173a1517aff3ddc74a1aad7..f72bece483e388b67948b71d0d923b484aa16f46 100644 |
| --- a/tests/corelib/uri_path_test.dart |
| +++ b/tests/corelib/uri_path_test.dart |
| @@ -2,6 +2,8 @@ |
| // 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 "dart:collection"; |
| + |
| import "package:expect/expect.dart"; |
| void testInvalidArguments() { |
| @@ -91,14 +93,27 @@ void testPathSegments() { |
| test(encoded + "/" + encoded, [unencoded, unencoded]); |
| Uri uri; |
| - uri = new Uri(pathSegments: ["xxx", "yyy", "zzz"]); |
| + List pathSegments = ["xxx", "yyy", "zzz"]; |
| + |
| + uri = new Uri(pathSegments: pathSegments); |
| + Expect.equals(3, uri.pathSegments.length); |
| + uri = new Uri(pathSegments: new DoubleLinkedQueue.from(pathSegments)); |
| + Expect.equals(3, uri.pathSegments.length); |
| + |
| + uri = new Uri(scheme: "http", |
| + host: "host", |
| + pathSegments: pathSegments); |
| Expect.equals(3, uri.pathSegments.length); |
| uri = new Uri(scheme: "http", |
| host: "host", |
| - pathSegments: ["xxx", "yyy", "zzz"]); |
| + pathSegments: new DoubleLinkedQueue.from(pathSegments)); |
| + Expect.equals(3, uri.pathSegments.length); |
| + |
| + uri = new Uri(scheme: "file", |
| + pathSegments: pathSegments); |
| Expect.equals(3, uri.pathSegments.length); |
| uri = new Uri(scheme: "file", |
| - pathSegments: ["xxx", "yyy", "zzz"]); |
| + pathSegments: new DoubleLinkedQueue.from(pathSegments)); |
|
Lasse Reichstein Nielsen
2013/08/26 13:55:37
Try using something that has inefficient length, e
Søren Gjesse
2013/08/26 14:24:54
Done.
|
| Expect.equals(3, uri.pathSegments.length); |
| } |