Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
| 2 // for details. All rights reserved. Use of this source code is governed by a | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 import 'package:expect/expect.dart'; | |
| 6 import 'dart:uri'; | |
| 7 | |
| 8 | |
| 9 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.
| |
| 10 var path = 'http://[::1]:1234/path?query=5#now'; | |
| 11 var uri = Uri.parse(path); | |
| 12 Expect.equals("http", uri.scheme); | |
| 13 Expect.equals("::1", uri.domain); | |
| 14 Expect.equals(1234, uri.port); | |
| 15 Expect.equals("/path", uri.path); | |
| 16 Expect.equals("query=5", uri.query); | |
| 17 Expect.equals("now", uri.fragment); | |
| 18 Expect.equals(path, uri.toString()); | |
| 19 } | |
| 20 | |
| 21 void main() { | |
| 22 testValidIpv6Uri(); | |
| 23 } | |
| 24 | |
| OLD | NEW |