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

Side by Side Diff: sdk/lib/core/uri.dart

Issue 1063603004: Fix typo in test, add check of error thrown. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/corelib/uri_file_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 part of dart.core; 5 part of dart.core;
6 6
7 /** 7 /**
8 * A parsed URI, such as a URL. 8 * A parsed URI, such as a URL.
9 * 9 *
10 * **See also:** 10 * **See also:**
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 } else { 744 } else {
745 throw new UnsupportedError("Illegal path character $segment"); 745 throw new UnsupportedError("Illegal path character $segment");
746 } 746 }
747 } 747 }
748 }); 748 });
749 } 749 }
750 750
751 static _checkWindowsPathReservedCharacters(List<String> segments, 751 static _checkWindowsPathReservedCharacters(List<String> segments,
752 bool argumentError, 752 bool argumentError,
753 [int firstSegment = 0]) { 753 [int firstSegment = 0]) {
754 segments.skip(firstSegment).forEach((segment) { 754 for (var segment in segments.skip(firstSegment)) {
755 if (segment.contains(new RegExp(r'["*/:<>?\\|]'))) { 755 if (segment.contains(new RegExp(r'["*/:<>?\\|]'))) {
756 if (argumentError) { 756 if (argumentError) {
757 throw new ArgumentError("Illegal character in path"); 757 throw new ArgumentError("Illegal character in path");
758 } else { 758 } else {
759 throw new UnsupportedError("Illegal character in path"); 759 throw new UnsupportedError("Illegal character in path");
760 } 760 }
761 } 761 }
762 }); 762 }
763 } 763 }
764 764
765 static _checkWindowsDriveLetter(int charCode, bool argumentError) { 765 static _checkWindowsDriveLetter(int charCode, bool argumentError) {
766 if ((_UPPER_CASE_A <= charCode && charCode <= _UPPER_CASE_Z) || 766 if ((_UPPER_CASE_A <= charCode && charCode <= _UPPER_CASE_Z) ||
767 (_LOWER_CASE_A <= charCode && charCode <= _LOWER_CASE_Z)) { 767 (_LOWER_CASE_A <= charCode && charCode <= _LOWER_CASE_Z)) {
768 return; 768 return;
769 } 769 }
770 if (argumentError) { 770 if (argumentError) {
771 throw new ArgumentError("Illegal drive letter " + 771 throw new ArgumentError("Illegal drive letter " +
772 new String.fromCharCode(charCode)); 772 new String.fromCharCode(charCode));
(...skipping 1691 matching lines...) Expand 10 before | Expand all | Expand 10 after
2464 0xafff, // 0x30 - 0x3f 1111111111110101 2464 0xafff, // 0x30 - 0x3f 1111111111110101
2465 // @ABCDEFGHIJKLMNO 2465 // @ABCDEFGHIJKLMNO
2466 0xffff, // 0x40 - 0x4f 1111111111111111 2466 0xffff, // 0x40 - 0x4f 1111111111111111
2467 // PQRSTUVWXYZ _ 2467 // PQRSTUVWXYZ _
2468 0x87ff, // 0x50 - 0x5f 1111111111100001 2468 0x87ff, // 0x50 - 0x5f 1111111111100001
2469 // abcdefghijklmno 2469 // abcdefghijklmno
2470 0xfffe, // 0x60 - 0x6f 0111111111111111 2470 0xfffe, // 0x60 - 0x6f 0111111111111111
2471 // pqrstuvwxyz ~ 2471 // pqrstuvwxyz ~
2472 0x47ff]; // 0x70 - 0x7f 1111111111100010 2472 0x47ff]; // 0x70 - 0x7f 1111111111100010
2473 } 2473 }
OLDNEW
« no previous file with comments | « no previous file | tests/corelib/uri_file_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698