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

Side by Side Diff: tests/corelib/uri_test.dart

Issue 167703010: Write custom URI-parser, to avoid using regexp. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/corelib/uri_parse_test.dart ('k') | tests/standalone/io/http_client_exception_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library uriTest; 5 library uriTest;
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 import 'dart:convert'; 8 import 'dart:convert';
9 9
10 testUri(String uri, bool isAbsolute) { 10 testUri(String uri, bool isAbsolute) {
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 testEncodeDecodeComponent("\uFFFE", "%EF%BF%BE"); 249 testEncodeDecodeComponent("\uFFFE", "%EF%BF%BE");
250 testEncodeDecodeComponent("\uFFFF", "%EF%BF%BF"); 250 testEncodeDecodeComponent("\uFFFF", "%EF%BF%BF");
251 testEncodeDecodeComponent("\x7f", "%7F"); 251 testEncodeDecodeComponent("\x7f", "%7F");
252 testEncodeDecodeComponent("\x80", "%C2%80"); 252 testEncodeDecodeComponent("\x80", "%C2%80");
253 testEncodeDecodeComponent("\u0800", "%E0%A0%80"); 253 testEncodeDecodeComponent("\u0800", "%E0%A0%80");
254 testEncodeDecodeComponent(":/@',;?&=+\$", "%3A%2F%40'%2C%3B%3F%26%3D%2B%24"); 254 testEncodeDecodeComponent(":/@',;?&=+\$", "%3A%2F%40'%2C%3B%3F%26%3D%2B%24");
255 testEncodeDecodeComponent(s, "%F0%90%80%80"); 255 testEncodeDecodeComponent(s, "%F0%90%80%80");
256 testEncodeDecodeQueryComponent("A + B", "A+%2B+B", "A+%2B+B", "A+%2B+B"); 256 testEncodeDecodeQueryComponent("A + B", "A+%2B+B", "A+%2B+B", "A+%2B+B");
257 testEncodeDecodeQueryComponent( 257 testEncodeDecodeQueryComponent(
258 "æ ø å", "%C3%A6+%C3%B8+%C3%A5", "%E6+%F8+%E5", null); 258 "æ ø å", "%C3%A6+%C3%B8+%C3%A5", "%E6+%F8+%E5", null);
259
260 // Invalid URI - : and @ is swapped, port ("host") should be numeric.
261 Expect.throws(
262 () => Uri.parse("file://user@password:host/path"),
263 (e) => e is FormatException);
259 } 264 }
OLDNEW
« no previous file with comments | « tests/corelib/uri_parse_test.dart ('k') | tests/standalone/io/http_client_exception_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698