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

Unified Diff: tests/corelib/uri_query_test.dart

Issue 354003002: Also fix uri_query_test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: And uri_test too. Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/corelib/uri_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/uri_query_test.dart
diff --git a/tests/corelib/uri_query_test.dart b/tests/corelib/uri_query_test.dart
index 6ec657cdbe9355ce5b6e62dd001b21f3d1f64140..4edf51cde682d734054c5c7c5aa7ca82101e8dde 100644
--- a/tests/corelib/uri_query_test.dart
+++ b/tests/corelib/uri_query_test.dart
@@ -22,6 +22,7 @@ void testQueryParameters() {
test(String query, Map<String, String> parameters, [String normalizedQuery]) {
if (normalizedQuery == null) normalizedQuery = query;
check(uri) {
+ Expect.isTrue(uri.hasQuery);
Expect.equals(normalizedQuery, uri.query);
Expect.equals("?$normalizedQuery", uri.toString());
if (parameters.containsValue(null)) {
@@ -37,10 +38,14 @@ void testQueryParameters() {
var uri2 = new Uri(query: query);
var uri3 = Uri.parse("?$query");
check(uri1);
- check(uri2);
+ if (query != "") {
+ check(uri2);
+ } else {
+ Expect.isFalse(uri2.hasQuery);
+ }
check(uri3);
Expect.equals(uri1, uri3);
- Expect.equals(uri2, uri3);
+ if (query != "") Expect.equals(uri2, uri3);
if (parameters.containsValue(null)) {
var map = new Map.from(parameters);
map.forEach((k, v) { if (v == null) map[k] = ""; });
« no previous file with comments | « no previous file | tests/corelib/uri_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698