| 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'));
|
|
|