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

Side by Side Diff: pkg/analyzer/test/generated/analysis_context_factory.dart

Issue 2654733003: Make Stream abstract as it is in the actual SDK. (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/non_error_resolver_driver_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.test.generated.analysis_context_factory; 5 library analyzer.test.generated.analysis_context_factory;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/token.dart'; 10 import 'package:analyzer/dart/ast/token.dart';
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 ElementFactory.classElement2("Completer", ["T"]); 231 ElementFactory.classElement2("Completer", ["T"]);
232 ConstructorElementImpl completerConstructor = 232 ConstructorElementImpl completerConstructor =
233 ElementFactory.constructorElement2(completerElement, null); 233 ElementFactory.constructorElement2(completerElement, null);
234 completerElement.constructors = <ConstructorElement>[completerConstructor]; 234 completerElement.constructors = <ConstructorElement>[completerConstructor];
235 // StreamSubscription 235 // StreamSubscription
236 ClassElementImpl streamSubscriptionElement = 236 ClassElementImpl streamSubscriptionElement =
237 ElementFactory.classElement2("StreamSubscription", ["T"]); 237 ElementFactory.classElement2("StreamSubscription", ["T"]);
238 // Stream 238 // Stream
239 ClassElementImpl streamElement = 239 ClassElementImpl streamElement =
240 ElementFactory.classElement2("Stream", ["T"]); 240 ElementFactory.classElement2("Stream", ["T"]);
241 streamElement.abstract = true;
241 streamElement.constructors = <ConstructorElement>[ 242 streamElement.constructors = <ConstructorElement>[
242 ElementFactory.constructorElement2(streamElement, null) 243 ElementFactory.constructorElement2(streamElement, null)
243 ]; 244 ];
244 DartType returnType = streamSubscriptionElement.type 245 DartType returnType = streamSubscriptionElement.type
245 .instantiate(streamElement.type.typeArguments); 246 .instantiate(streamElement.type.typeArguments);
246 FunctionElementImpl listenOnData = ElementFactory.functionElement3( 247 FunctionElementImpl listenOnData = ElementFactory.functionElement3(
247 'onData', 248 'onData',
248 VoidTypeImpl.instance.element, 249 VoidTypeImpl.instance.element,
249 <TypeDefiningElement>[streamElement.typeParameters[0]], 250 <TypeDefiningElement>[streamElement.typeParameters[0]],
250 null); 251 null);
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 572
572 void _addLibrary(LibraryMap map, String uri, bool isInternal, String path) { 573 void _addLibrary(LibraryMap map, String uri, bool isInternal, String path) {
573 SdkLibraryImpl library = new SdkLibraryImpl(uri); 574 SdkLibraryImpl library = new SdkLibraryImpl(uri);
574 if (isInternal) { 575 if (isInternal) {
575 library.category = "Internal"; 576 library.category = "Internal";
576 } 577 }
577 library.path = path; 578 library.path = path;
578 map.setLibrary(uri, library); 579 map.setLibrary(uri, library);
579 } 580 }
580 } 581 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/non_error_resolver_driver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698