| OLD | NEW |
| 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 import "dart:async"; | 5 import "dart:async"; |
| 6 import "dart:utf"; | 6 import "dart:utf"; |
| 7 part "../../../sdk/lib/io/input_stream.dart"; | 7 part "../../../sdk/lib/io/input_stream.dart"; |
| 8 part "../../../sdk/lib/io/output_stream.dart"; | 8 part "../../../sdk/lib/io/output_stream.dart"; |
| 9 part "../../../sdk/lib/io/chunked_stream.dart"; | 9 part "../../../sdk/lib/io/chunked_stream.dart"; |
| 10 part "../../../sdk/lib/io/string_stream.dart"; | 10 part "../../../sdk/lib/io/string_stream.dart"; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 String queryString = | 26 String queryString = |
| 27 '%3F=%3D&foo=bar&%26=%25&sqrt2=%E2%88%9A2&name=Franti%C5%A1ek'; | 27 '%3F=%3D&foo=bar&%26=%25&sqrt2=%E2%88%9A2&name=Franti%C5%A1ek'; |
| 28 Map<String, String> map = _HttpUtils.splitQueryString(queryString); | 28 Map<String, String> map = _HttpUtils.splitQueryString(queryString); |
| 29 for (String key in map.keys) { | 29 for (String key in map.keys) { |
| 30 Expect.equals(map[key], { '&' : '%', | 30 Expect.equals(map[key], { '&' : '%', |
| 31 'foo' : 'bar', | 31 'foo' : 'bar', |
| 32 '?' : '=', | 32 '?' : '=', |
| 33 'sqrt2' : '\u221A2', | 33 'sqrt2' : '\u221A2', |
| 34 'name' : 'Franti\u0161ek'}[key]); | 34 'name' : 'Franti\u0161ek'}[key]); |
| 35 } | 35 } |
| 36 Expect.setEquals(map.keys, ['&', '?', 'foo', 'sqrt2', 'name']); | 36 Expect.setEquals(map.keys.toSet(), ['&', '?', 'foo', 'sqrt2', 'name']); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void main() { | 39 void main() { |
| 40 testParseEncodedString(); | 40 testParseEncodedString(); |
| 41 testParseQueryString(); | 41 testParseQueryString(); |
| 42 } | 42 } |
| OLD | NEW |