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

Unified Diff: pkg/analyzer/test/src/task/inputs_test.dart

Issue 1842363004: More strong mode fixes for analyzer (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Backout options changes Created 4 years, 9 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/analyzer/test/src/task/driver_test.dart ('k') | pkg/analyzer/test/src/task/options_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/task/inputs_test.dart
diff --git a/pkg/analyzer/test/src/task/inputs_test.dart b/pkg/analyzer/test/src/task/inputs_test.dart
index be975989c3a1e4d5b2247a99d95ec1112e250288..509c296d5e61a0750828907018c0a90a7db208c4 100644
--- a/pkg/analyzer/test/src/task/inputs_test.dart
+++ b/pkg/analyzer/test/src/task/inputs_test.dart
@@ -141,7 +141,8 @@ class ListTaskInputImplTest extends EngineTestCase {
test_toList() {
var input = new ListTaskInputImpl<AnalysisTarget>(target, result1);
- TaskInput<List> input2 = input.toList((target) => 'name');
+ TaskInput<List> input2 =
+ input.toList((target) => new SimpleTaskInput(target, null));
expect(input2,
new isInstanceOf<ListToListTaskInput<AnalysisTarget, String>>());
}
@@ -155,7 +156,8 @@ class ListTaskInputImplTest extends EngineTestCase {
test_toMap() {
var input = new ListTaskInputImpl<AnalysisTarget>(target, result1);
- TaskInput<Map> input2 = input.toMap((target) => 'name');
+ TaskInput<Map> input2 =
+ input.toMap((target) => new SimpleTaskInput(target, null));
expect(
input2, new isInstanceOf<ListToMapTaskInput<AnalysisTarget, String>>());
}
@@ -170,8 +172,8 @@ class ListTaskInputImplTest extends EngineTestCase {
@reflectiveTest
class ListToListTaskInputBuilderTest extends EngineTestCase {
static final AnalysisTarget target1 = new TestSource();
- static final ResultDescriptorImpl result1 =
- new ResultDescriptorImpl('result1', null);
+ static final ResultDescriptorImpl<List> result1 =
+ new ResultDescriptorImpl<List>('result1', null);
static final ResultDescriptorImpl result2 =
new ResultDescriptorImpl('result2', null);
static final ListToListTaskInput input = new ListToListTaskInput(
@@ -342,11 +344,11 @@ class ListToListTaskInputBuilderTest extends EngineTestCase {
@reflectiveTest
class ListToListTaskInputTest extends EngineTestCase {
static final AnalysisTarget target = new TestSource();
- static final ResultDescriptorImpl result =
- new ResultDescriptorImpl('result', null);
+ static final ResultDescriptorImpl<List> result =
+ new ResultDescriptorImpl<List>('result', null);
test_create() {
- SimpleTaskInput baseAccessor = result.of(target);
+ SimpleTaskInput<List> baseAccessor = result.of(target);
GenerateTaskInputs generate = (object) {};
ListToListTaskInput input = new ListToListTaskInput(baseAccessor, generate);
expect(input, isNotNull);
@@ -355,7 +357,7 @@ class ListToListTaskInputTest extends EngineTestCase {
}
test_createBuilder() {
- SimpleTaskInput baseAccessor = result.of(target);
+ SimpleTaskInput<List> baseAccessor = result.of(target);
GenerateTaskInputs generate = (object) {};
ListToListTaskInput input = new ListToListTaskInput(baseAccessor, generate);
expect(input.createBuilder(), isNotNull);
@@ -365,8 +367,8 @@ class ListToListTaskInputTest extends EngineTestCase {
@reflectiveTest
class ListToMapTaskInputBuilderTest extends EngineTestCase {
static final AnalysisTarget target1 = new TestSource('target1');
- static final ResultDescriptorImpl result1 =
- new ResultDescriptorImpl('result1', null);
+ static final ResultDescriptorImpl<List> result1 =
+ new ResultDescriptorImpl<List>('result1', null);
static final ResultDescriptorImpl result2 =
new ResultDescriptorImpl('result2', null);
static final ListToMapTaskInput input = new ListToMapTaskInput(
@@ -535,11 +537,11 @@ class ListToMapTaskInputBuilderTest extends EngineTestCase {
@reflectiveTest
class ListToMapTaskInputTest extends EngineTestCase {
static final AnalysisTarget target = new TestSource();
- static final ResultDescriptorImpl result =
- new ResultDescriptorImpl('result', null);
+ static final ResultDescriptorImpl<List> result =
+ new ResultDescriptorImpl<List>('result', null);
test_create() {
- SimpleTaskInput baseAccessor = result.of(target);
+ SimpleTaskInput<List> baseAccessor = result.of(target);
GenerateTaskInputs generate = (object) {};
ListToMapTaskInput input = new ListToMapTaskInput(baseAccessor, generate);
expect(input, isNotNull);
@@ -548,7 +550,7 @@ class ListToMapTaskInputTest extends EngineTestCase {
}
test_createBuilder() {
- SimpleTaskInput baseAccessor = result.of(target);
+ SimpleTaskInput<List> baseAccessor = result.of(target);
GenerateTaskInputs generate = (object) {};
ListToMapTaskInput input = new ListToMapTaskInput(baseAccessor, generate);
expect(input.createBuilder(), isNotNull);
@@ -561,7 +563,7 @@ class ObjectToListTaskInputBuilderTest {
static final ResultDescriptorImpl result =
new ResultDescriptorImpl('result', null);
static final SimpleTaskInput baseInput = new SimpleTaskInput(target, result);
- static final Function mapper = (x) => [x];
+ static final mapper = (Object x) => [x];
static final ObjectToListTaskInput input =
new ObjectToListTaskInput(baseInput, mapper);
@@ -689,7 +691,7 @@ class ObjectToListTaskInputTest extends EngineTestCase {
test_create() {
SimpleTaskInput baseInput = new SimpleTaskInput(target, result);
- Function mapper = (x) => [x];
+ var mapper = (Object x) => [x];
ObjectToListTaskInput input = new ObjectToListTaskInput(baseInput, mapper);
expect(input, isNotNull);
expect(input.baseInput, baseInput);
@@ -698,7 +700,7 @@ class ObjectToListTaskInputTest extends EngineTestCase {
test_createBuilder() {
SimpleTaskInput baseInput = new SimpleTaskInput(target, result);
- Function mapper = (x) => [x];
+ var mapper = (Object x) => [x];
ObjectToListTaskInput input = new ObjectToListTaskInput(baseInput, mapper);
expect(input.createBuilder(),
new isInstanceOf<ObjectToListTaskInputBuilder>());
« no previous file with comments | « pkg/analyzer/test/src/task/driver_test.dart ('k') | pkg/analyzer/test/src/task/options_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698