Skip to content

Commit 39312fb

Browse files
authored
Remove dead code. (#3989)
1 parent d0349c3 commit 39312fb

File tree

3 files changed

+4
-21
lines changed

3 files changed

+4
-21
lines changed

_test_common/lib/matchers.dart

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,16 @@ final Matcher throwsCorruptedException = throwsA(
1616
final Matcher duplicateAssetNodeException =
1717
const TypeMatcher<DuplicateAssetNodeException>();
1818

19-
Matcher equalsAssetGraph(
20-
AssetGraph expected, {
21-
bool checkPreviousInputsDigest = true,
22-
}) => _AssetGraphMatcher(expected, checkPreviousInputsDigest);
19+
Matcher equalsAssetGraph(AssetGraph expected) => _AssetGraphMatcher(expected);
2320

2421
class _AssetGraphMatcher extends Matcher {
2522
final AssetGraph _expected;
26-
final bool checkPreviousInputsDigest;
2723
final Matcher _matcher;
2824

29-
_AssetGraphMatcher(this._expected, this.checkPreviousInputsDigest)
25+
_AssetGraphMatcher(this._expected)
3026
: _matcher = equals(_graphToList(_expected));
3127

3228
/// Converts [graph] to a list of [AssetNode], sorted by ID, for comparison.
33-
///
34-
/// If [checkPreviousInputsDigest] is false, removes `previousInputDigest`
35-
/// fields so they won't be compared.
3629
static List<AssetNode> _graphToList(AssetGraph graph) =>
3730
graph.allNodes.toList()
3831
..sort((a, b) => a.id.toString().compareTo(b.id.toString()));

build_runner/test/generate/watch_test.dart

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -410,12 +410,7 @@ void main() {
410410
], computeDigest(cTxtId, 'c')),
411411
);
412412

413-
// TODO: We dont have a shared way of computing the combined input
414-
// hashes today, but eventually we should test those here too.
415-
expect(
416-
cachedGraph,
417-
equalsAssetGraph(expectedGraph, checkPreviousInputsDigest: false),
418-
);
413+
expect(cachedGraph, equalsAssetGraph(expectedGraph));
419414
expect(
420415
cachedGraph.allPostProcessBuildStepOutputs,
421416
expectedGraph.allPostProcessBuildStepOutputs,

build_runner_core/test/generate/build_test.dart

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,12 +1357,7 @@ void main() {
13571357
outputs: {bPostCopyNode.id},
13581358
);
13591359

1360-
// TODO: We dont have a shared way of computing the combined input hashes
1361-
// today, but eventually we should test those here too.
1362-
expect(
1363-
cachedGraph,
1364-
equalsAssetGraph(expectedGraph, checkPreviousInputsDigest: false),
1365-
);
1360+
expect(cachedGraph, equalsAssetGraph(expectedGraph));
13661361
expect(
13671362
cachedGraph.allPostProcessBuildStepOutputs,
13681363
expectedGraph.allPostProcessBuildStepOutputs,

0 commit comments

Comments
 (0)