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

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

Issue 1605763007: Validate that int values that we write to summaries are >= 0. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
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 library analyzer.test.generated.resolver_test; 5 library analyzer.test.generated.resolver_test;
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/visitor.dart'; 10 import 'package:analyzer/dart/ast/visitor.dart';
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // dart:core 120 // dart:core
121 // 121 //
122 TestTypeProvider provider = new TestTypeProvider(); 122 TestTypeProvider provider = new TestTypeProvider();
123 CompilationUnitElementImpl coreUnit = 123 CompilationUnitElementImpl coreUnit =
124 new CompilationUnitElementImpl("core.dart"); 124 new CompilationUnitElementImpl("core.dart");
125 Source coreSource = sourceFactory.forUri(DartSdk.DART_CORE); 125 Source coreSource = sourceFactory.forUri(DartSdk.DART_CORE);
126 coreContext.setContents(coreSource, ""); 126 coreContext.setContents(coreSource, "");
127 coreUnit.librarySource = coreUnit.source = coreSource; 127 coreUnit.librarySource = coreUnit.source = coreSource;
128 ClassElementImpl proxyClassElement = ElementFactory.classElement2("_Proxy"); 128 ClassElementImpl proxyClassElement = ElementFactory.classElement2("_Proxy");
129 proxyClassElement.constructors = <ConstructorElement>[ 129 proxyClassElement.constructors = <ConstructorElement>[
130 ElementFactory.constructorElement(proxyClassElement, null, true) 130 ElementFactory.constructorElement(proxyClassElement, '', true)
131 ..isCycleFree = true 131 ..isCycleFree = true
132 ..constantInitializers = <ConstructorInitializer>[] 132 ..constantInitializers = <ConstructorInitializer>[]
133 ]; 133 ];
134 ClassElement objectClassElement = provider.objectType.element; 134 ClassElement objectClassElement = provider.objectType.element;
135 coreUnit.types = <ClassElement>[ 135 coreUnit.types = <ClassElement>[
136 provider.boolType.element, 136 provider.boolType.element,
137 provider.deprecatedType.element, 137 provider.deprecatedType.element,
138 provider.doubleType.element, 138 provider.doubleType.element,
139 provider.functionType.element, 139 provider.functionType.element,
140 provider.intType.element, 140 provider.intType.element,
(...skipping 16762 matching lines...) Expand 10 before | Expand all | Expand 10 after
16903 16903
16904 void _resolveTestUnit(String code) { 16904 void _resolveTestUnit(String code) {
16905 testCode = code; 16905 testCode = code;
16906 testSource = addSource(testCode); 16906 testSource = addSource(testCode);
16907 LibraryElement library = resolve2(testSource); 16907 LibraryElement library = resolve2(testSource);
16908 assertNoErrors(testSource); 16908 assertNoErrors(testSource);
16909 verify([testSource]); 16909 verify([testSource]);
16910 testUnit = resolveCompilationUnit(testSource, library); 16910 testUnit = resolveCompilationUnit(testSource, library);
16911 } 16911 }
16912 } 16912 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/summarize_elements.dart ('k') | pkg/analyzer/tool/summary/generate.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698