[flutter_tools] provide more context for build_system invalidation (#77961)
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// @dart = 2.8
|
||||
|
||||
import 'package:flutter_tools/src/build_system/build_system.dart';
|
||||
|
||||
import '../../src/common.dart';
|
||||
|
||||
void main() {
|
||||
testWithoutContext('InvalidatedReason formats message per invalidation kind', () {
|
||||
final InvalidatedReason inputChanged = InvalidatedReason(InvalidatedReasonKind.inputChanged)
|
||||
..data.add('a.dart');
|
||||
final InvalidatedReason outputChanged = InvalidatedReason(InvalidatedReasonKind.outputChanged)
|
||||
..data.add('b.dart');
|
||||
final InvalidatedReason inputMissing = InvalidatedReason(InvalidatedReasonKind.inputMissing)
|
||||
..data.add('c.dart');
|
||||
final InvalidatedReason outputMissing = InvalidatedReason(InvalidatedReasonKind.outputMissing)
|
||||
..data.add('d.dart');
|
||||
final InvalidatedReason outputSetChanged = InvalidatedReason(InvalidatedReasonKind.outputSetChanged)
|
||||
..data.add('e.dart');
|
||||
|
||||
expect(inputChanged.toString(), 'The following inputs have updated contents: a.dart');
|
||||
expect(outputChanged.toString(), 'The following outputs have updated contents: b.dart');
|
||||
expect(inputMissing.toString(), 'The following inputs were missing: c.dart');
|
||||
expect(outputMissing.toString(), 'The following outputs were missing: d.dart');
|
||||
expect(outputSetChanged.toString(), 'The following outputs were removed from the output set: e.dart');
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user