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

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

Issue 337943002: Adjust server for API changes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed bug 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 | « pkg/analysis_server/test/domain_server_test.dart ('k') | pkg/analysis_server/test/socket_server_test.dart » ('j') | 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 79c394be1500e1b82f5ca007316df873bb59ecb0..293bdd274d1bb631f17e4e16792cdf6e732faf44 100644
--- a/pkg/analysis_server/test/protocol_test.dart
+++ b/pkg/analysis_server/test/protocol_test.dart
@@ -389,6 +389,24 @@ class RequestDatumTest {
}
@runTest
+ static void asList_nonList() {
+ setUp();
+ expect(() => makeDatum(3).asList((datum) => null), _throwsInvalidParameter);
+ }
+
+ @runTest
+ static void asList_emptyList() {
+ setUp();
+ expect(makeDatum([]).asList((datum) => datum.asString()), equals([]));
+ }
+
+ @runTest
+ static void asList_nonEmptyList() {
+ setUp();
+ expect(makeDatum(['foo', 'bar']).asList((datum) => datum.asString()), equals(['foo', 'bar']));
+ }
+
+ @runTest
static void asString() {
setUp();
expect(makeDatum('foo').asString(), equals('foo'));
« no previous file with comments | « pkg/analysis_server/test/domain_server_test.dart ('k') | pkg/analysis_server/test/socket_server_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698