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

Side by Side Diff: pkg/analyzer/test/src/task/dart_test.dart

Issue 2298493002: Make LIBRARY_CYCLE_UNITS and LIBRARY_CYCLE_DEPENDENCIES be List<LibrarySpecificUnit>. (Closed)
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | no next file » | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.src.task.dart_test; 5 library analyzer.test.src.task.dart_test;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/ast/token.dart'; 8 import 'package:analyzer/dart/ast/token.dart';
9 import 'package:analyzer/dart/ast/visitor.dart'; 9 import 'package:analyzer/dart/ast/visitor.dart';
10 import 'package:analyzer/dart/element/element.dart'; 10 import 'package:analyzer/dart/element/element.dart';
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1522 expect(dependencies, unorderedEquals([elementB])); 1522 expect(dependencies, unorderedEquals([elementB]));
1523 } 1523 }
1524 } 1524 }
1525 1525
1526 @reflectiveTest 1526 @reflectiveTest
1527 class ComputeLibraryCycleTaskTest extends _AbstractDartTaskTest { 1527 class ComputeLibraryCycleTaskTest extends _AbstractDartTaskTest {
1528 List<LibraryElement> getLibraryCycle(Map<ResultDescriptor, dynamic> outputs) { 1528 List<LibraryElement> getLibraryCycle(Map<ResultDescriptor, dynamic> outputs) {
1529 return outputs[LIBRARY_CYCLE] as List<LibraryElement>; 1529 return outputs[LIBRARY_CYCLE] as List<LibraryElement>;
1530 } 1530 }
1531 1531
1532 List<CompilationUnitElement> getLibraryCycleDependencies( 1532 List<LibrarySpecificUnit> getLibraryCycleDependencies(
1533 Map<ResultDescriptor, dynamic> outputs) { 1533 Map<ResultDescriptor, dynamic> outputs) {
1534 return outputs[LIBRARY_CYCLE_DEPENDENCIES] as List<CompilationUnitElement>; 1534 return outputs[LIBRARY_CYCLE_DEPENDENCIES] as List<LibrarySpecificUnit>;
1535 } 1535 }
1536 1536
1537 List<CompilationUnitElement> getLibraryCycleUnits( 1537 List<LibrarySpecificUnit> getLibraryCycleUnits(
1538 Map<ResultDescriptor, dynamic> outputs) { 1538 Map<ResultDescriptor, dynamic> outputs) {
1539 return outputs[LIBRARY_CYCLE_UNITS] as List<CompilationUnitElement>; 1539 return outputs[LIBRARY_CYCLE_UNITS] as List<LibrarySpecificUnit>;
1540 } 1540 }
1541 1541
1542 @override 1542 @override
1543 void setUp() { 1543 void setUp() {
1544 super.setUp(); 1544 super.setUp();
1545 enableStrongMode(); 1545 enableStrongMode();
1546 } 1546 }
1547 1547
1548 void test_library_cycle_incremental() { 1548 void test_library_cycle_incremental() {
1549 enableStrongMode(); 1549 enableStrongMode();
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1694 import 'a.dart'; 1694 import 'a.dart';
1695 ''' 1695 '''
1696 }); 1696 });
1697 List<Map<ResultDescriptor, dynamic>> results = 1697 List<Map<ResultDescriptor, dynamic>> results =
1698 computeLibraryResultsMap(sources, LIBRARY_CYCLE); 1698 computeLibraryResultsMap(sources, LIBRARY_CYCLE);
1699 List<LibraryElement> component0 = getLibraryCycle(results[0]); 1699 List<LibraryElement> component0 = getLibraryCycle(results[0]);
1700 List<LibraryElement> component1 = getLibraryCycle(results[1]); 1700 List<LibraryElement> component1 = getLibraryCycle(results[1]);
1701 expect(component0, hasLength(1)); 1701 expect(component0, hasLength(1));
1702 expect(component1, hasLength(1)); 1702 expect(component1, hasLength(1));
1703 1703
1704 List<CompilationUnitElement> units0 = getLibraryCycleUnits(results[0]); 1704 List<LibrarySpecificUnit> units0 = getLibraryCycleUnits(results[0]);
1705 List<CompilationUnitElement> units1 = getLibraryCycleUnits(results[1]); 1705 List<LibrarySpecificUnit> units1 = getLibraryCycleUnits(results[1]);
1706 expect(units0, hasLength(1)); 1706 expect(units0, hasLength(1));
1707 expect(units1, hasLength(1)); 1707 expect(units1, hasLength(1));
1708 1708
1709 List<CompilationUnitElement> dep0 = getLibraryCycleDependencies(results[0]); 1709 List<LibrarySpecificUnit> dep0 = getLibraryCycleDependencies(results[0]);
1710 List<CompilationUnitElement> dep1 = getLibraryCycleDependencies(results[1]); 1710 List<LibrarySpecificUnit> dep1 = getLibraryCycleDependencies(results[1]);
1711 expect(dep0, hasLength(1)); // dart:core 1711 expect(dep0, hasLength(1)); // dart:core
1712 expect(dep1, hasLength(2)); // dart:core, a.dart 1712 expect(dep1, hasLength(2)); // dart:core, a.dart
1713 } 1713 }
1714 1714
1715 void test_library_cycle_loop() { 1715 void test_library_cycle_loop() {
1716 List<Source> sources = newSources({ 1716 List<Source> sources = newSources({
1717 '/a.dart': ''' 1717 '/a.dart': '''
1718 import 'c.dart'; 1718 import 'c.dart';
1719 ''', 1719 ''',
1720 '/b.dart': ''' 1720 '/b.dart': '''
1721 import 'a.dart'; 1721 import 'a.dart';
1722 ''', 1722 ''',
1723 '/c.dart': ''' 1723 '/c.dart': '''
1724 import 'b.dart'; 1724 import 'b.dart';
1725 ''' 1725 '''
1726 }); 1726 });
1727 List<Map<ResultDescriptor, dynamic>> results = 1727 List<Map<ResultDescriptor, dynamic>> results =
1728 computeLibraryResultsMap(sources, LIBRARY_CYCLE).toList(); 1728 computeLibraryResultsMap(sources, LIBRARY_CYCLE).toList();
1729 List<LibraryElement> component0 = getLibraryCycle(results[0]); 1729 List<LibraryElement> component0 = getLibraryCycle(results[0]);
1730 List<LibraryElement> component1 = getLibraryCycle(results[1]); 1730 List<LibraryElement> component1 = getLibraryCycle(results[1]);
1731 List<LibraryElement> component2 = getLibraryCycle(results[2]); 1731 List<LibraryElement> component2 = getLibraryCycle(results[2]);
1732 1732
1733 expect(component0, hasLength(3)); 1733 expect(component0, hasLength(3));
1734 expect(component1, hasLength(3)); 1734 expect(component1, hasLength(3));
1735 expect(component2, hasLength(3)); 1735 expect(component2, hasLength(3));
1736 1736
1737 List<CompilationUnitElement> units0 = getLibraryCycleUnits(results[0]); 1737 List<LibrarySpecificUnit> units0 = getLibraryCycleUnits(results[0]);
1738 List<CompilationUnitElement> units1 = getLibraryCycleUnits(results[1]); 1738 List<LibrarySpecificUnit> units1 = getLibraryCycleUnits(results[1]);
1739 List<CompilationUnitElement> units2 = getLibraryCycleUnits(results[2]); 1739 List<LibrarySpecificUnit> units2 = getLibraryCycleUnits(results[2]);
1740 expect(units0, hasLength(3)); 1740 expect(units0, hasLength(3));
1741 expect(units1, hasLength(3)); 1741 expect(units1, hasLength(3));
1742 expect(units2, hasLength(3)); 1742 expect(units2, hasLength(3));
1743 1743
1744 List<CompilationUnitElement> dep0 = getLibraryCycleDependencies(results[0]); 1744 List<LibrarySpecificUnit> dep0 = getLibraryCycleDependencies(results[0]);
1745 List<CompilationUnitElement> dep1 = getLibraryCycleDependencies(results[1]); 1745 List<LibrarySpecificUnit> dep1 = getLibraryCycleDependencies(results[1]);
1746 List<CompilationUnitElement> dep2 = getLibraryCycleDependencies(results[2]); 1746 List<LibrarySpecificUnit> dep2 = getLibraryCycleDependencies(results[2]);
1747 expect(dep0, hasLength(1)); // dart:core 1747 expect(dep0, hasLength(1)); // dart:core
1748 expect(dep1, hasLength(1)); // dart:core 1748 expect(dep1, hasLength(1)); // dart:core
1749 expect(dep2, hasLength(1)); // dart:core 1749 expect(dep2, hasLength(1)); // dart:core
1750 } 1750 }
1751 1751
1752 void test_library_cycle_override_inference_incremental() { 1752 void test_library_cycle_override_inference_incremental() {
1753 enableStrongMode(); 1753 enableStrongMode();
1754 Source lib1Source = newSource( 1754 Source lib1Source = newSource(
1755 '/my_lib1.dart', 1755 '/my_lib1.dart',
1756 ''' 1756 '''
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1812 List<Source> sources = newSources({ 1812 List<Source> sources = newSources({
1813 '/a.dart': ''' 1813 '/a.dart': '''
1814 import 'a.dart'; 1814 import 'a.dart';
1815 ''' 1815 '''
1816 }); 1816 });
1817 List<Map<ResultDescriptor, dynamic>> results = 1817 List<Map<ResultDescriptor, dynamic>> results =
1818 computeLibraryResultsMap(sources, LIBRARY_CYCLE).toList(); 1818 computeLibraryResultsMap(sources, LIBRARY_CYCLE).toList();
1819 List<LibraryElement> component0 = getLibraryCycle(results[0]); 1819 List<LibraryElement> component0 = getLibraryCycle(results[0]);
1820 expect(component0, hasLength(1)); 1820 expect(component0, hasLength(1));
1821 1821
1822 List<CompilationUnitElement> units0 = getLibraryCycleUnits(results[0]); 1822 List<LibrarySpecificUnit> units0 = getLibraryCycleUnits(results[0]);
1823 expect(units0, hasLength(1)); 1823 expect(units0, hasLength(1));
1824 1824
1825 List<CompilationUnitElement> dep0 = getLibraryCycleDependencies(results[0]); 1825 List<LibrarySpecificUnit> dep0 = getLibraryCycleDependencies(results[0]);
1826 expect(dep0, hasLength(1)); // dart:core 1826 expect(dep0, hasLength(1)); // dart:core
1827 } 1827 }
1828 1828
1829 void test_library_cycle_singleton() { 1829 void test_library_cycle_singleton() {
1830 Source source = newSource( 1830 Source source = newSource(
1831 '/test.dart', 1831 '/test.dart',
1832 ''' 1832 '''
1833 import 'dart:core'; 1833 import 'dart:core';
1834 '''); 1834 ''');
1835 computeResult(source, LIBRARY_CYCLE); 1835 computeResult(source, LIBRARY_CYCLE);
1836 List<LibraryElement> component = getLibraryCycle(outputs); 1836 List<LibraryElement> component = getLibraryCycle(outputs);
1837 List<CompilationUnitElement> units = getLibraryCycleUnits(outputs); 1837 List<LibrarySpecificUnit> units = getLibraryCycleUnits(outputs);
1838 List<CompilationUnitElement> deps = getLibraryCycleDependencies(outputs); 1838 List<LibrarySpecificUnit> deps = getLibraryCycleDependencies(outputs);
1839 expect(component, hasLength(1)); 1839 expect(component, hasLength(1));
1840 expect(units, hasLength(1)); 1840 expect(units, hasLength(1));
1841 expect(deps, hasLength(1)); 1841 expect(deps, hasLength(1));
1842 } 1842 }
1843 1843
1844 void test_library_cycle_tree() { 1844 void test_library_cycle_tree() {
1845 List<Source> sources = newSources({ 1845 List<Source> sources = newSources({
1846 '/a.dart': ''' 1846 '/a.dart': '''
1847 ''', 1847 ''',
1848 '/b.dart': ''' 1848 '/b.dart': '''
1849 ''', 1849 ''',
1850 '/c.dart': ''' 1850 '/c.dart': '''
1851 import 'a.dart'; 1851 import 'a.dart';
1852 import 'b.dart'; 1852 import 'b.dart';
1853 ''' 1853 '''
1854 }); 1854 });
1855 List<Map<ResultDescriptor, dynamic>> results = 1855 List<Map<ResultDescriptor, dynamic>> results =
1856 computeLibraryResultsMap(sources, LIBRARY_CYCLE); 1856 computeLibraryResultsMap(sources, LIBRARY_CYCLE);
1857 List<LibraryElement> component0 = getLibraryCycle(results[0]); 1857 List<LibraryElement> component0 = getLibraryCycle(results[0]);
1858 List<LibraryElement> component1 = getLibraryCycle(results[1]); 1858 List<LibraryElement> component1 = getLibraryCycle(results[1]);
1859 List<LibraryElement> component2 = getLibraryCycle(results[2]); 1859 List<LibraryElement> component2 = getLibraryCycle(results[2]);
1860 expect(component0, hasLength(1)); 1860 expect(component0, hasLength(1));
1861 expect(component1, hasLength(1)); 1861 expect(component1, hasLength(1));
1862 expect(component2, hasLength(1)); 1862 expect(component2, hasLength(1));
1863 1863
1864 List<CompilationUnitElement> units0 = getLibraryCycleUnits(results[0]); 1864 List<LibrarySpecificUnit> units0 = getLibraryCycleUnits(results[0]);
1865 List<CompilationUnitElement> units1 = getLibraryCycleUnits(results[1]); 1865 List<LibrarySpecificUnit> units1 = getLibraryCycleUnits(results[1]);
1866 List<CompilationUnitElement> units2 = getLibraryCycleUnits(results[2]); 1866 List<LibrarySpecificUnit> units2 = getLibraryCycleUnits(results[2]);
1867 expect(units0, hasLength(1)); 1867 expect(units0, hasLength(1));
1868 expect(units1, hasLength(1)); 1868 expect(units1, hasLength(1));
1869 expect(units2, hasLength(1)); 1869 expect(units2, hasLength(1));
1870 1870
1871 List<CompilationUnitElement> dep0 = getLibraryCycleDependencies(results[0]); 1871 List<LibrarySpecificUnit> dep0 = getLibraryCycleDependencies(results[0]);
1872 List<CompilationUnitElement> dep1 = getLibraryCycleDependencies(results[1]); 1872 List<LibrarySpecificUnit> dep1 = getLibraryCycleDependencies(results[1]);
1873 List<CompilationUnitElement> dep2 = getLibraryCycleDependencies(results[2]); 1873 List<LibrarySpecificUnit> dep2 = getLibraryCycleDependencies(results[2]);
1874 expect(dep0, hasLength(1)); // dart:core 1874 expect(dep0, hasLength(1)); // dart:core
1875 expect(dep1, hasLength(1)); // dart:core, 1875 expect(dep1, hasLength(1)); // dart:core,
1876 expect(dep2, hasLength(3)); // dart:core, a.dart, b.dart 1876 expect(dep2, hasLength(3)); // dart:core, a.dart, b.dart
1877 } 1877 }
1878 1878
1879 void test_library_double_loop() { 1879 void test_library_double_loop() {
1880 List<Source> sources = newSources({ 1880 List<Source> sources = newSources({
1881 '/a.dart': ''' 1881 '/a.dart': '''
1882 import 'b.dart'; 1882 import 'b.dart';
1883 ''', 1883 ''',
(...skipping 16 matching lines...) Expand all
1900 List<LibraryElement> component0 = getLibraryCycle(results[0]); 1900 List<LibraryElement> component0 = getLibraryCycle(results[0]);
1901 List<LibraryElement> component1 = getLibraryCycle(results[1]); 1901 List<LibraryElement> component1 = getLibraryCycle(results[1]);
1902 List<LibraryElement> component2 = getLibraryCycle(results[2]); 1902 List<LibraryElement> component2 = getLibraryCycle(results[2]);
1903 List<LibraryElement> component3 = getLibraryCycle(results[3]); 1903 List<LibraryElement> component3 = getLibraryCycle(results[3]);
1904 1904
1905 expect(component0, hasLength(2)); 1905 expect(component0, hasLength(2));
1906 expect(component1, hasLength(2)); 1906 expect(component1, hasLength(2));
1907 expect(component2, hasLength(2)); 1907 expect(component2, hasLength(2));
1908 expect(component3, hasLength(2)); 1908 expect(component3, hasLength(2));
1909 1909
1910 List<CompilationUnitElement> units0 = getLibraryCycleUnits(results[0]); 1910 List<LibrarySpecificUnit> units0 = getLibraryCycleUnits(results[0]);
1911 List<CompilationUnitElement> units1 = getLibraryCycleUnits(results[1]); 1911 List<LibrarySpecificUnit> units1 = getLibraryCycleUnits(results[1]);
1912 List<CompilationUnitElement> units2 = getLibraryCycleUnits(results[2]); 1912 List<LibrarySpecificUnit> units2 = getLibraryCycleUnits(results[2]);
1913 List<CompilationUnitElement> units3 = getLibraryCycleUnits(results[3]); 1913 List<LibrarySpecificUnit> units3 = getLibraryCycleUnits(results[3]);
1914 expect(units0, hasLength(2)); 1914 expect(units0, hasLength(2));
1915 expect(units1, hasLength(2)); 1915 expect(units1, hasLength(2));
1916 expect(units2, hasLength(2)); 1916 expect(units2, hasLength(2));
1917 expect(units3, hasLength(2)); 1917 expect(units3, hasLength(2));
1918 1918
1919 List<CompilationUnitElement> dep0 = getLibraryCycleDependencies(results[0]); 1919 List<LibrarySpecificUnit> dep0 = getLibraryCycleDependencies(results[0]);
1920 List<CompilationUnitElement> dep1 = getLibraryCycleDependencies(results[1]); 1920 List<LibrarySpecificUnit> dep1 = getLibraryCycleDependencies(results[1]);
1921 List<CompilationUnitElement> dep2 = getLibraryCycleDependencies(results[2]); 1921 List<LibrarySpecificUnit> dep2 = getLibraryCycleDependencies(results[2]);
1922 List<CompilationUnitElement> dep3 = getLibraryCycleDependencies(results[3]); 1922 List<LibrarySpecificUnit> dep3 = getLibraryCycleDependencies(results[3]);
1923 expect(dep0, hasLength(1)); // dart:core 1923 expect(dep0, hasLength(1)); // dart:core
1924 expect(dep1, hasLength(1)); // dart:core 1924 expect(dep1, hasLength(1)); // dart:core
1925 expect(dep2, hasLength(3)); // dart:core, a.dart, b.dart 1925 expect(dep2, hasLength(3)); // dart:core, a.dart, b.dart
1926 expect(dep3, hasLength(3)); // dart:core, a.dart, b.dart 1926 expect(dep3, hasLength(3)); // dart:core, a.dart, b.dart
1927 } 1927 }
1928 1928
1929 void test_library_double_loop_parts() { 1929 void test_library_double_loop_parts() {
1930 List<Source> sources = newSources({ 1930 List<Source> sources = newSources({
1931 '/a.dart': ''' 1931 '/a.dart': '''
1932 import 'b.dart'; 1932 import 'b.dart';
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1969 List<LibraryElement> component0 = getLibraryCycle(results0); 1969 List<LibraryElement> component0 = getLibraryCycle(results0);
1970 List<LibraryElement> component1 = getLibraryCycle(results1); 1970 List<LibraryElement> component1 = getLibraryCycle(results1);
1971 List<LibraryElement> component4 = getLibraryCycle(results4); 1971 List<LibraryElement> component4 = getLibraryCycle(results4);
1972 List<LibraryElement> component5 = getLibraryCycle(results5); 1972 List<LibraryElement> component5 = getLibraryCycle(results5);
1973 1973
1974 expect(component0, hasLength(2)); 1974 expect(component0, hasLength(2));
1975 expect(component1, hasLength(2)); 1975 expect(component1, hasLength(2));
1976 expect(component4, hasLength(2)); 1976 expect(component4, hasLength(2));
1977 expect(component5, hasLength(2)); 1977 expect(component5, hasLength(2));
1978 1978
1979 List<CompilationUnitElement> units0 = getLibraryCycleUnits(results0); 1979 List<LibrarySpecificUnit> units0 = getLibraryCycleUnits(results0);
1980 List<CompilationUnitElement> units1 = getLibraryCycleUnits(results1); 1980 List<LibrarySpecificUnit> units1 = getLibraryCycleUnits(results1);
1981 List<CompilationUnitElement> units4 = getLibraryCycleUnits(results4); 1981 List<LibrarySpecificUnit> units4 = getLibraryCycleUnits(results4);
1982 List<CompilationUnitElement> units5 = getLibraryCycleUnits(results5); 1982 List<LibrarySpecificUnit> units5 = getLibraryCycleUnits(results5);
1983 expect(units0, hasLength(4)); 1983 expect(units0, hasLength(4));
1984 expect(units1, hasLength(4)); 1984 expect(units1, hasLength(4));
1985 expect(units4, hasLength(4)); 1985 expect(units4, hasLength(4));
1986 expect(units5, hasLength(4)); 1986 expect(units5, hasLength(4));
1987 1987
1988 List<CompilationUnitElement> dep0 = getLibraryCycleDependencies(results0); 1988 List<LibrarySpecificUnit> dep0 = getLibraryCycleDependencies(results0);
1989 List<CompilationUnitElement> dep1 = getLibraryCycleDependencies(results1); 1989 List<LibrarySpecificUnit> dep1 = getLibraryCycleDependencies(results1);
1990 List<CompilationUnitElement> dep4 = getLibraryCycleDependencies(results4); 1990 List<LibrarySpecificUnit> dep4 = getLibraryCycleDependencies(results4);
1991 List<CompilationUnitElement> dep5 = getLibraryCycleDependencies(results5); 1991 List<LibrarySpecificUnit> dep5 = getLibraryCycleDependencies(results5);
1992 expect(dep0, hasLength(1)); // dart:core 1992 expect(dep0, hasLength(1)); // dart:core
1993 expect(dep1, hasLength(1)); // dart:core 1993 expect(dep1, hasLength(1)); // dart:core
1994 expect(dep4, hasLength(5)); // dart:core, a.dart, aa.dart, ab.dart, b.dart 1994 expect(dep4, hasLength(5)); // dart:core, a.dart, aa.dart, ab.dart, b.dart
1995 expect(dep5, hasLength(5)); // dart:core, a.dart, aa.dart, ab.dart, b.dart 1995 expect(dep5, hasLength(5)); // dart:core, a.dart, aa.dart, ab.dart, b.dart
1996 } 1996 }
1997 1997
1998 void _assertLibraryCycle(Source source, List<Source> expected) { 1998 void _assertLibraryCycle(Source source, List<Source> expected) {
1999 computeResult(source, LIBRARY_CYCLE); 1999 computeResult(source, LIBRARY_CYCLE);
2000 List<LibraryElement> cycle = outputs[LIBRARY_CYCLE] as List<LibraryElement>; 2000 List<LibraryElement> cycle = outputs[LIBRARY_CYCLE] as List<LibraryElement>;
2001 expect(cycle.map((e) => e.source), unorderedEquals(expected)); 2001 expect(cycle.map((e) => e.source), unorderedEquals(expected));
(...skipping 3540 matching lines...) Expand 10 before | Expand all | Expand 10 after
5542 /** 5542 /**
5543 * Fill [errorListener] with [result] errors in the current [task]. 5543 * Fill [errorListener] with [result] errors in the current [task].
5544 */ 5544 */
5545 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) { 5545 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) {
5546 List<AnalysisError> errors = task.outputs[result] as List<AnalysisError>; 5546 List<AnalysisError> errors = task.outputs[result] as List<AnalysisError>;
5547 expect(errors, isNotNull, reason: result.name); 5547 expect(errors, isNotNull, reason: result.name);
5548 errorListener = new GatheringErrorListener(); 5548 errorListener = new GatheringErrorListener();
5549 errorListener.addAll(errors); 5549 errorListener.addAll(errors);
5550 } 5550 }
5551 } 5551 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698