Chromium Code Reviews| Index: tests/lib/uri/uri_ipv6_test.dart |
| diff --git a/tests/lib/uri/uri_ipv6_test.dart b/tests/lib/uri/uri_ipv6_test.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d1c32a124081490a64a560c931d339e51c2e0c28 |
| --- /dev/null |
| +++ b/tests/lib/uri/uri_ipv6_test.dart |
| @@ -0,0 +1,24 @@ |
| +// 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. |
| + |
| +import 'package:expect/expect.dart'; |
| +import 'dart:uri'; |
| + |
| + |
| +void testValidIpv6Uri() { |
|
Søren Gjesse
2013/05/01 07:46:58
Add tests of all examples in RFC2732
http://
Anders Johnsen
2013/05/01 08:07:27
Done.
|
| + var path = 'http://[::1]:1234/path?query=5#now'; |
| + var uri = Uri.parse(path); |
| + Expect.equals("http", uri.scheme); |
| + Expect.equals("::1", uri.domain); |
| + Expect.equals(1234, uri.port); |
| + Expect.equals("/path", uri.path); |
| + Expect.equals("query=5", uri.query); |
| + Expect.equals("now", uri.fragment); |
| + Expect.equals(path, uri.toString()); |
| +} |
| + |
| +void main() { |
| + testValidIpv6Uri(); |
| +} |
| + |