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

Side by Side Diff: pkg/analyzer/lib/src/generated/testing/element_factory.dart

Issue 879373002: Make test context more accurate (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/testing/test_type_provider.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.testing.element_factory; 8 library engine.testing.element_factory;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 DartObjectImpl value = 157 DartObjectImpl value =
158 new DartObjectImpl(enumType, new GenericState(fieldMap)); 158 new DartObjectImpl(enumType, new GenericState(fieldMap));
159 constantElement.evaluationResult = new EvaluationResultImpl.con1(value); 159 constantElement.evaluationResult = new EvaluationResultImpl.con1(value);
160 fields.add(constantElement); 160 fields.add(constantElement);
161 } 161 }
162 } 162 }
163 // 163 //
164 // Finish building the enum. 164 // Finish building the enum.
165 // 165 //
166 enumElement.fields = fields; 166 enumElement.fields = fields;
167 167 // Client code isn't allowed to invoke the constructor, so we do not model i t.
168
169 // Client code isn't allowed to invoke the constructor, so we do not mod el it.
170 return enumElement; 168 return enumElement;
171 } 169 }
172 170
173 static ExportElementImpl exportFor(LibraryElement exportedLibrary, 171 static ExportElementImpl exportFor(LibraryElement exportedLibrary,
174 [List<NamespaceCombinator> combinators = NamespaceCombinator.EMPTY_ARRAY]) { 172 [List<NamespaceCombinator> combinators = NamespaceCombinator.EMPTY_ARRAY]) {
175 ExportElementImpl spec = new ExportElementImpl(); 173 ExportElementImpl spec = new ExportElementImpl();
176 spec.exportedLibrary = exportedLibrary; 174 spec.exportedLibrary = exportedLibrary;
177 spec.combinators = combinators; 175 spec.combinators = combinators;
178 return spec; 176 return spec;
179 } 177 }
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 variable.synthetic = true; 488 variable.synthetic = true;
491 PropertyAccessorElementImpl getter = 489 PropertyAccessorElementImpl getter =
492 new PropertyAccessorElementImpl.forVariable(variable); 490 new PropertyAccessorElementImpl.forVariable(variable);
493 getter.getter = true; 491 getter.getter = true;
494 getter.synthetic = true; 492 getter.synthetic = true;
495 getter.variable = variable; 493 getter.variable = variable;
496 getter.returnType = type; 494 getter.returnType = type;
497 variable.getter = getter; 495 variable.getter = getter;
498 FunctionTypeImpl getterType = new FunctionTypeImpl.con1(getter); 496 FunctionTypeImpl getterType = new FunctionTypeImpl.con1(getter);
499 getter.type = getterType; 497 getter.type = getterType;
500 if (!isFinal) { 498 if (!isConst && !isFinal) {
501 PropertyAccessorElementImpl setter = 499 PropertyAccessorElementImpl setter =
502 new PropertyAccessorElementImpl.forVariable(variable); 500 new PropertyAccessorElementImpl.forVariable(variable);
503 setter.setter = true; 501 setter.setter = true;
504 setter.static = true; 502 setter.static = true;
505 setter.synthetic = true; 503 setter.synthetic = true;
506 setter.variable = variable; 504 setter.variable = variable;
507 setter.parameters = 505 setter.parameters =
508 <ParameterElement>[requiredParameter2("_$name", type)]; 506 <ParameterElement>[requiredParameter2("_$name", type)];
509 setter.returnType = VoidTypeImpl.instance; 507 setter.returnType = VoidTypeImpl.instance;
510 setter.type = new FunctionTypeImpl.con1(setter); 508 setter.type = new FunctionTypeImpl.con1(setter);
511 variable.setter = setter; 509 variable.setter = setter;
512 } 510 }
513 return variable; 511 return variable;
514 } 512 }
515 } 513 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/testing/test_type_provider.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698