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

Unified Diff: pkg/analysis_server/test/protocol_test.dart

Issue 308923003: Initial implementation for 'analysis.setSubscriptions' API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 | « pkg/analysis_server/test/mocks.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/protocol_test.dart
diff --git a/pkg/analysis_server/test/protocol_test.dart b/pkg/analysis_server/test/protocol_test.dart
index 61ec2b6aba1d8dc1f46085ec87eda027c11ef85c..79c394be1500e1b82f5ca007316df873bb59ecb0 100644
--- a/pkg/analysis_server/test/protocol_test.dart
+++ b/pkg/analysis_server/test/protocol_test.dart
@@ -425,6 +425,32 @@ class RequestDatumTest {
}).asStringMap(), _throwsInvalidParameter);
expect(() => makeDatum([]).asStringMap(), _throwsInvalidParameter);
}
+
+ @runTest
+ static void asStringListMap() {
+ setUp();
+ {
+ var map = {
+ 'key1': ['value11', 'value12'],
+ 'key2': ['value21', 'value22']
+ };
+ expect(makeDatum(map).asStringListMap(), map);
+ }
+ {
+ var map = {
+ 'key1': 10,
+ 'key2': 20
+ };
+ expect(() => makeDatum(map).asStringListMap(), _throwsInvalidParameter);
+ }
+ {
+ var map = {
+ 'key1': [11, 12],
+ 'key2': [21, 22]
+ };
+ expect(() => makeDatum(map).asStringListMap(), _throwsInvalidParameter);
+ }
+ }
}
class ResponseTest {
« no previous file with comments | « pkg/analysis_server/test/mocks.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698