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

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

Issue 1305863011: Improve strong-mode implementation and fix several failing tests (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Addressed comments Created 5 years, 3 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/dart_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/task/strong_mode_test.dart
diff --git a/pkg/analyzer/test/src/task/strong_mode_test.dart b/pkg/analyzer/test/src/task/strong_mode_test.dart
index 6d9b3f964d5f16c0626e0bb1fb4772b337447014..7b719ab0d16070e2f62c1e165dd5c9bded0aa268 100644
--- a/pkg/analyzer/test/src/task/strong_mode_test.dart
+++ b/pkg/analyzer/test/src/task/strong_mode_test.dart
@@ -18,55 +18,11 @@ import '../context/abstract_context.dart';
main() {
initializeTestEnvironment();
- runReflectiveTests(InferrenceFinderTest);
runReflectiveTests(InstanceMemberInferrerTest);
runReflectiveTests(VariableGathererTest);
}
@reflectiveTest
-class InferrenceFinderTest extends AbstractContextTest {
- void test_creation() {
- InferrenceFinder finder = new InferrenceFinder();
- expect(finder, isNotNull);
- expect(finder.classes, isEmpty);
- expect(finder.staticVariables, isEmpty);
- }
-
- void test_visit() {
- Source source = addSource(
- '/test.dart',
- r'''
-const c = 1;
-final f = '';
-var v = const A();
-int i;
-class A {
- static final fa = 0;
- static int fi;
- const A();
-}
-class B extends A {
- static const cb = 1;
- static vb = 0;
- const ci = 2;
- final fi = '';
- var vi;
-}
-class C = Object with A;
-typedef int F(int x);
-''');
- LibrarySpecificUnit librarySpecificUnit =
- new LibrarySpecificUnit(source, source);
- computeResult(librarySpecificUnit, RESOLVED_UNIT5);
- CompilationUnit unit = outputs[RESOLVED_UNIT5];
- InferrenceFinder finder = new InferrenceFinder();
- unit.accept(finder);
- expect(finder.classes, hasLength(3));
- expect(finder.staticVariables, hasLength(6));
- }
-}
-
-@reflectiveTest
class InstanceMemberInferrerTest extends AbstractContextTest {
InstanceMemberInferrer get createInferrer =>
new InstanceMemberInferrer(context.typeProvider);
« no previous file with comments | « pkg/analyzer/test/src/task/dart_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698