mirror of
https://github.com/flutter/flutter
synced 2024-10-02 14:34:22 +00:00
Fixed few typos (#147087)
Here's another PR with a couple of typos fixed. As you can see there was a typo in _fileReferenceI**n**dentifiers_, in class _ParsedProjectInfo._ Maybe we should do some check on that since I'm not sure if that property is used somewhere outside Flutter?
This commit is contained in:
parent
d737b7bae0
commit
140edb9883
|
@ -46,7 +46,7 @@ class WaterfallNotchedRectangle extends NotchedShape {
|
|||
// A detailed explanation and the derivation of the formulas below is
|
||||
// available at: https://goo.gl/Ufzrqn
|
||||
|
||||
// s1, s2 are the two knobs controlling the behavior of the bezzier curve.
|
||||
// s1, s2 are the two knobs controlling the behavior of the bezier curve.
|
||||
const double s1 = 21.0;
|
||||
const double s2 = 6.0;
|
||||
|
||||
|
|
|
@ -250,7 +250,7 @@ void main([List<String> args = const <String>[]]) {
|
|||
await driver.requestData('isTestingReplyOnly') == 'true';
|
||||
|
||||
if (args.contains('--with_semantics')) {
|
||||
stdout.writeln('Enabeling semantics...');
|
||||
stdout.writeln('Enabling semantics...');
|
||||
await driver.setSemantics(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ class _TextButtonExampleState extends State<TextButtonExample> {
|
|||
|
||||
// This gradient's appearance reflects the button's state.
|
||||
// Always return a gradient decoration so that AnimatedContainer
|
||||
// can interpolorate in between. Used by TextButton #7.
|
||||
// can interpolate in between. Used by TextButton #7.
|
||||
Decoration? statesToDecoration(Set<MaterialState> states) {
|
||||
if (states.contains(MaterialState.pressed)) {
|
||||
return BoxDecoration(
|
||||
|
|
|
@ -10,7 +10,7 @@ import 'package:flutter_api_samples/material/dropdown_menu/dropdown_menu.2.dart'
|
|||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('DropdownMenu cursor behavoir', (WidgetTester tester) async {
|
||||
testWidgets('DropdownMenu cursor behavior', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const example.DropdownMenuApp(),
|
||||
);
|
||||
|
|
|
@ -19,7 +19,7 @@ import 'input_border.dart';
|
|||
/// See also:
|
||||
///
|
||||
/// * [WidgetState], a general non-Material version that can be used
|
||||
/// interchangebly with `MaterialState`. They functionally work the same,
|
||||
/// interchangeably with `MaterialState`. They functionally work the same,
|
||||
/// except [WidgetState] can be used outside of Material.
|
||||
/// * [MaterialStateProperty], an interface for objects that "resolve" to
|
||||
/// different values depending on a widget's material state.
|
||||
|
@ -59,7 +59,7 @@ typedef MaterialState = WidgetState;
|
|||
/// See also:
|
||||
///
|
||||
/// * [WidgetPropertyResolver], the non-Material form of `MaterialPropertyResolver`
|
||||
/// that can be used interchangably with `MaterialPropertyResolver.
|
||||
/// that can be used interchangeably with `MaterialPropertyResolver.
|
||||
@Deprecated(
|
||||
'Use WidgetPropertyResolver instead. '
|
||||
'Moved to the Widgets layer to make code available outside of Material. '
|
||||
|
@ -118,7 +118,7 @@ typedef MaterialPropertyResolver<T> = WidgetPropertyResolver<T>;
|
|||
/// See also
|
||||
///
|
||||
/// * [WidgetStateColor], the non-Material version that can be used
|
||||
/// interchangably with `MaterialStateColor`.
|
||||
/// interchangeably with `MaterialStateColor`.
|
||||
@Deprecated(
|
||||
'Use WidgetStateColor instead. '
|
||||
'Moved to the Widgets layer to make code available outside of Material. '
|
||||
|
|
|
@ -1470,13 +1470,13 @@ class TextPainter {
|
|||
.getBoxesForRange(graphemeRange.start, graphemeRange.end, boxHeightStyle: ui.BoxHeightStyle.strut);
|
||||
|
||||
if (boxes.isNotEmpty) {
|
||||
final bool ahchorToLeft = switch (glyphInfo.writingDirection) {
|
||||
final bool anchorToLeft = switch (glyphInfo.writingDirection) {
|
||||
TextDirection.ltr => anchorToLeadingEdge,
|
||||
TextDirection.rtl => !anchorToLeadingEdge,
|
||||
};
|
||||
final TextBox box = ahchorToLeft ? boxes.first : boxes.last;
|
||||
final TextBox box = anchorToLeft ? boxes.first : boxes.last;
|
||||
metrics = _LineCaretMetrics(
|
||||
offset: Offset(ahchorToLeft ? box.left : box.right, box.top),
|
||||
offset: Offset(anchorToLeft ? box.left : box.right, box.top),
|
||||
writingDirection: box.direction,
|
||||
);
|
||||
} else {
|
||||
|
|
|
@ -984,7 +984,7 @@ extension type const BaselineOffset(double? offset) {
|
|||
///
|
||||
/// Subclasses do not own their own cache storage. Rather, their [memoize]
|
||||
/// implementation takes a `cacheStorage`. If a prior computation with the same
|
||||
/// input valus has already been memoized in `cacheStorage`, it returns the
|
||||
/// input values has already been memoized in `cacheStorage`, it returns the
|
||||
/// memoized value without running `computer`. Otherwise the method runs the
|
||||
/// `computer` to compute the return value, and caches the result to
|
||||
/// `cacheStorage`.
|
||||
|
@ -2046,7 +2046,7 @@ abstract class RenderBox extends RenderObject {
|
|||
final double? baselineOffset = _computeIntrinsics(_CachedLayoutCalculation.baseline, (constraints, baseline), _computeDryBaseline).offset;
|
||||
// This assert makes sure computeDryBaseline always gets called in debug mode,
|
||||
// in case the computeDryBaseline implementation invokes debugCannotComputeDryLayout.
|
||||
// This check should be skipped when debugCheckintIntrinsics is true to avoid
|
||||
// This check should be skipped when debugCheckingIntrinsics is true to avoid
|
||||
// slowing down the app significantly.
|
||||
assert(RenderObject.debugCheckingIntrinsics || baselineOffset == computeDryBaseline(constraints, baseline));
|
||||
return baselineOffset;
|
||||
|
@ -2194,7 +2194,7 @@ abstract class RenderBox extends RenderObject {
|
|||
'${objectRuntimeType(renderBoxDoingDryBaseline, 'RenderBox')}.computeDryBaseline.'
|
||||
'The computeDryBaseline method must not access '
|
||||
'${renderBoxDoingDryBaseline == this ? "the RenderBox's own size" : "the size of its child"},'
|
||||
"because it's established in peformLayout or peformResize using different BoxConstraints."
|
||||
"because it's established in performLayout or performResize using different BoxConstraints."
|
||||
);
|
||||
assert(size == _size);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ extension type const _AxisSize._(Size _size) {
|
|||
// The ascent and descent of a baseline-aligned child.
|
||||
//
|
||||
// Baseline-aligned children contributes to the cross axis extent of a [RenderFlex]
|
||||
// differently from chidren with other [CrossAxisAlignment]s.
|
||||
// differently from children with other [CrossAxisAlignment]s.
|
||||
extension type const _AscentDescent._((double ascent, double descent)? ascentDescent) {
|
||||
factory _AscentDescent({ required double? baselineOffset, required double crossSize }) {
|
||||
return baselineOffset == null ? none : _AscentDescent._((baselineOffset, crossSize - baselineOffset));
|
||||
|
@ -76,7 +76,7 @@ class _LayoutSizes {
|
|||
final _AxisSize axisSize;
|
||||
|
||||
// The free space along the main axis. If the value is positive, the free space
|
||||
// will be distributed according to the [MainAxisAliggnment] specified. A
|
||||
// will be distributed according to the [MainAxisAlignment] specified. A
|
||||
// negative value indicates the RenderFlex overflows along the main axis.
|
||||
final double mainAxisFreeSpace;
|
||||
|
||||
|
@ -1060,7 +1060,7 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
|
|||
final double? baselineOffset = sizes.baselineOffset;
|
||||
assert(baselineOffset == null || (crossAxisAlignment == CrossAxisAlignment.baseline && direction == Axis.horizontal));
|
||||
|
||||
// Position all chilren in visual order: starting from the top-left child and
|
||||
// Position all children in visual order: starting from the top-left child and
|
||||
// work towards the child that's farthest away from the origin.
|
||||
double childMainPosition = leadingSpace;
|
||||
for (RenderBox? child = topLeftChild; child != null; child = nextChild(child)) {
|
||||
|
|
|
@ -2045,7 +2045,7 @@ class _SelectableFragment with Selectable, Diagnosticable, ChangeNotifier implem
|
|||
// [WidgetSpan]s.
|
||||
//
|
||||
// This method differs from [_updateSelectionStartEdgeByMultiSelectableBoundary]
|
||||
// in that to mantain the origin text boundary selected at a placeholder,
|
||||
// in that to maintain the origin text boundary selected at a placeholder,
|
||||
// this selectable fragment must be aware of the [RenderParagraph] that closely
|
||||
// encompasses the complete origin text boundary.
|
||||
//
|
||||
|
@ -2229,7 +2229,7 @@ class _SelectableFragment with Selectable, Diagnosticable, ChangeNotifier implem
|
|||
// [WidgetSpan]s.
|
||||
//
|
||||
// This method differs from [_updateSelectionEndEdgeByMultiSelectableBoundary]
|
||||
// in that to mantain the origin text boundary selected at a placeholder, this
|
||||
// in that to maintain the origin text boundary selected at a placeholder, this
|
||||
// selectable fragment must be aware of the [RenderParagraph] that closely
|
||||
// encompasses the complete origin text boundary.
|
||||
//
|
||||
|
|
|
@ -1929,7 +1929,7 @@ final class _OverlayEntryLocation extends LinkedListEntry<_OverlayEntryLocation>
|
|||
//
|
||||
// Generally, `assert(_debugIsLocationValid())` should be used to prevent
|
||||
// invalid accesses to an invalid `_OverlayEntryLocation` object. Exceptions
|
||||
// to this rule are _removeChild, _deactive, which will be called when the
|
||||
// to this rule are _removeChild, _deactivate, which will be called when the
|
||||
// OverlayPortal is being removed from the widget tree and may use the
|
||||
// location information to perform cleanup tasks.
|
||||
//
|
||||
|
|
|
@ -604,7 +604,7 @@ abstract interface class PredictiveBackRoute {
|
|||
/// Handles a predictive back gesture ending successfully.
|
||||
void handleCommitBackGesture();
|
||||
|
||||
/// Handles a predictive back gesture ending in cancelation.
|
||||
/// Handles a predictive back gesture ending in cancellation.
|
||||
void handleCancelBackGesture();
|
||||
}
|
||||
|
||||
|
|
|
@ -1211,7 +1211,7 @@ void main() {
|
|||
expect(chipTopLeft.dx, avatarCenter.dx - (labelSize.width / 2) - padding - border);
|
||||
expect(chipTopLeft.dy, avatarCenter.dy - (labelSize.width / 2) - padding - border);
|
||||
|
||||
// Calculate the distnance between avatar and label.
|
||||
// Calculate the distance between avatar and label.
|
||||
Offset labelTopLeft = tester.getTopLeft(find.byType(Container));
|
||||
expect(labelTopLeft.dx, avatarCenter.dx + (labelSize.width / 2) + labelPadding);
|
||||
|
||||
|
@ -1227,7 +1227,7 @@ void main() {
|
|||
expect(chipTopLeft.dx, avatarCenter.dx - (iconSize / 2) - padding - border);
|
||||
expect(chipTopLeft.dy, avatarCenter.dy - (labelSize.width / 2) - padding - border);
|
||||
|
||||
// Calculate the distnance between avatar and label.
|
||||
// Calculate the distance between avatar and label.
|
||||
labelTopLeft = tester.getTopLeft(find.byType(Container));
|
||||
expect(labelTopLeft.dx, avatarCenter.dx + (iconSize / 2) + labelPadding);
|
||||
});
|
||||
|
|
|
@ -525,7 +525,7 @@ void main() {
|
|||
expect(chipTopLeft.dx, avatarCenter.dx - (labelSize.width / 2) - padding - border);
|
||||
expect(chipTopLeft.dy, avatarCenter.dy - (labelSize.width / 2) - padding - border);
|
||||
|
||||
// Calculate the distnance between avatar and label.
|
||||
// Calculate the distance between avatar and label.
|
||||
Offset labelTopLeft = tester.getTopLeft(find.byType(Container));
|
||||
expect(labelTopLeft.dx, avatarCenter.dx + (labelSize.width / 2) + labelPadding);
|
||||
|
||||
|
@ -541,7 +541,7 @@ void main() {
|
|||
expect(chipTopLeft.dx, avatarCenter.dx - (iconSize / 2) - padding - border);
|
||||
expect(chipTopLeft.dy, avatarCenter.dy - (labelSize.width / 2) - padding - border);
|
||||
|
||||
// Calculate the distnance between avatar and label.
|
||||
// Calculate the distance between avatar and label.
|
||||
labelTopLeft = tester.getTopLeft(find.byType(Container));
|
||||
expect(labelTopLeft.dx, avatarCenter.dx + (iconSize / 2) + labelPadding);
|
||||
});
|
||||
|
|
|
@ -3263,7 +3263,7 @@ void main() {
|
|||
);
|
||||
|
||||
// Label and input are horizontally aligned despite `alignLabelWithHint` being false (default value).
|
||||
// The reason is that `alignLabelWithHint` was initially intended for vertical alignement only.
|
||||
// The reason is that `alignLabelWithHint` was initially intended for vertical alignment only.
|
||||
// See https://github.com/flutter/flutter/pull/24993 which introduced `alignLabelWithHint` parameter.
|
||||
// See https://github.com/flutter/flutter/pull/115409 which used `alignLabelWithHint` for
|
||||
// horizontal alignment in outlined text field.
|
||||
|
|
|
@ -2867,7 +2867,7 @@ void main() {
|
|||
expect(tester.takeException(), isNull);
|
||||
});
|
||||
|
||||
testWidgets('ScaffoldMessenger showSnackBar default animatiom', (WidgetTester tester) async {
|
||||
testWidgets('ScaffoldMessenger showSnackBar default animation', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(MaterialApp(
|
||||
home: Scaffold(
|
||||
body: Builder(
|
||||
|
|
|
@ -1680,7 +1680,7 @@ void main() {
|
|||
..layout();
|
||||
expect(painter.height, 100);
|
||||
});
|
||||
}, skip: kIsWeb && !isSkiaWeb); // [intended] strut spport for HTML renderer https://github.com/flutter/flutter/issues/32243.
|
||||
}, skip: kIsWeb && !isSkiaWeb); // [intended] strut support for HTML renderer https://github.com/flutter/flutter/issues/32243.
|
||||
|
||||
test('getOffsetForCaret does not crash on decomposed characters', () {
|
||||
final TextPainter painter = TextPainter(
|
||||
|
|
|
@ -222,7 +222,7 @@ void main() {
|
|||
);
|
||||
});
|
||||
|
||||
test('Cactches inconsistencies between computeDryBaseline and computeDistanceToActualBaseline', () {
|
||||
test('Catches inconsistencies between computeDryBaseline and computeDistanceToActualBaseline', () {
|
||||
final RenderDryBaselineTestBox test = RenderDryBaselineTestBox();
|
||||
layout(test, phase: EnginePhase.composite);
|
||||
|
||||
|
|
|
@ -674,7 +674,7 @@ void main() {
|
|||
|
||||
test('cross axis intrinsics, with ascending flex flow layout', () {
|
||||
const BoxConstraints square = BoxConstraints.tightFor(width: 5.0, height: 5.0);
|
||||
// 3 'A's separated by zero-width spaces. Max instrinsic width = 30, min intrinsic width = 10
|
||||
// 3 'A's separated by zero-width spaces. Max intrinsic width = 30, min intrinsic width = 10
|
||||
final TextSpan textSpan = TextSpan(text: List<String>.filled(3, 'A').join('\u200B') , style: const TextStyle(fontSize: 10));
|
||||
final RenderConstrainedBox box1 = RenderConstrainedBox(additionalConstraints: square);
|
||||
final RenderParagraph box2 = RenderParagraph(textSpan, textDirection: TextDirection.ltr);
|
||||
|
@ -711,7 +711,7 @@ void main() {
|
|||
|
||||
test('cross axis intrinsics, with descending flex flow layout', () {
|
||||
const BoxConstraints square = BoxConstraints.tightFor(width: 5.0, height: 5.0);
|
||||
// 3 'A's separated by zero-width spaces. Max instrinsic width = 30, min intrinsic width = 10
|
||||
// 3 'A's separated by zero-width spaces. Max intrinsic width = 30, min intrinsic width = 10
|
||||
final TextSpan textSpan = TextSpan(text: List<String>.filled(3, 'A').join('\u200B') , style: const TextStyle(fontSize: 10));
|
||||
final RenderConstrainedBox box1 = RenderConstrainedBox(additionalConstraints: square);
|
||||
final RenderParagraph box2 = RenderParagraph(textSpan, textDirection: TextDirection.ltr);
|
||||
|
|
|
@ -111,5 +111,5 @@ void main() {
|
|||
|
||||
paragraph.strutStyle = const StrutStyle(fontSize: 100, forceStrutHeight: true);
|
||||
expect(paragraph.getMaxIntrinsicHeight(double.infinity), 100);
|
||||
}, skip: kIsWeb && !isSkiaWeb); // [intended] strut spport for HTML renderer https://github.com/flutter/flutter/issues/32243.
|
||||
}, skip: kIsWeb && !isSkiaWeb); // [intended] strut support for HTML renderer https://github.com/flutter/flutter/issues/32243.
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ export 'skia_client.dart';
|
|||
// titled "Inconsequential golden test" in this file:
|
||||
// /packages/flutter/test/widgets/basic_test.dart
|
||||
|
||||
// TODO(ianh): sort the parameters and arguments in this file so they use a consistent order througout.
|
||||
// TODO(ianh): sort the parameters and arguments in this file so they use a consistent order throughout.
|
||||
|
||||
const String _kFlutterRootKey = 'FLUTTER_ROOT';
|
||||
|
||||
|
|
|
@ -1148,9 +1148,9 @@ class FlutterPlugin implements Plugin<Project> {
|
|||
bundleSkSLPathValue = project.property(propBundleSkslPath)
|
||||
}
|
||||
String performanceMeasurementFileValue
|
||||
final String propPerformanceMesaurementFile = "performance-measurement-file"
|
||||
if (project.hasProperty(propPerformanceMesaurementFile)) {
|
||||
performanceMeasurementFileValue = project.property(propPerformanceMesaurementFile)
|
||||
final String propPerformanceMeasurementFile = "performance-measurement-file"
|
||||
if (project.hasProperty(propPerformanceMeasurementFile)) {
|
||||
performanceMeasurementFileValue = project.property(propPerformanceMeasurementFile)
|
||||
}
|
||||
String codeSizeDirectoryValue
|
||||
final String propCodeSizeDirectory = "code-size-directory"
|
||||
|
|
|
@ -43,31 +43,31 @@ class SwiftPackageManagerIntegrationMigration extends ProjectMigrator {
|
|||
final File _xcodeProjectInfoFile;
|
||||
final PlistParser _plistParser;
|
||||
|
||||
/// New identifer for FlutterGeneratedPluginSwiftPackage PBXBuildFile.
|
||||
/// New identifier for FlutterGeneratedPluginSwiftPackage PBXBuildFile.
|
||||
static const String _flutterPluginsSwiftPackageBuildFileIdentifier = '78A318202AECB46A00862997';
|
||||
|
||||
/// New identifer for FlutterGeneratedPluginSwiftPackage XCLocalSwiftPackageReference.
|
||||
/// New identifier for FlutterGeneratedPluginSwiftPackage XCLocalSwiftPackageReference.
|
||||
static const String _localFlutterPluginsSwiftPackageReferenceIdentifer = '781AD8BC2B33823900A9FFBB';
|
||||
|
||||
/// New identifer for FlutterGeneratedPluginSwiftPackage XCSwiftPackageProductDependency.
|
||||
/// New identifier for FlutterGeneratedPluginSwiftPackage XCSwiftPackageProductDependency.
|
||||
static const String _flutterPluginsSwiftPackageProductDependencyIdentifer = '78A3181F2AECB46A00862997';
|
||||
|
||||
/// Existing iOS identifer for Runner PBXFrameworksBuildPhase.
|
||||
/// Existing iOS identifier for Runner PBXFrameworksBuildPhase.
|
||||
static const String _iosRunnerFrameworksBuildPhaseIdentifer = '97C146EB1CF9000F007C117D';
|
||||
|
||||
/// Existing macOS identifer for Runner PBXFrameworksBuildPhase.
|
||||
/// Existing macOS identifier for Runner PBXFrameworksBuildPhase.
|
||||
static const String _macosRunnerFrameworksBuildPhaseIdentifer = '33CC10EA2044A3C60003C045';
|
||||
|
||||
/// Existing iOS identifer for Runner PBXNativeTarget.
|
||||
/// Existing iOS identifier for Runner PBXNativeTarget.
|
||||
static const String _iosRunnerNativeTargetIdentifer = '97C146ED1CF9000F007C117D';
|
||||
|
||||
/// Existing macOS identifer for Runner PBXNativeTarget.
|
||||
/// Existing macOS identifier for Runner PBXNativeTarget.
|
||||
static const String _macosRunnerNativeTargetIdentifer = '33CC10EC2044A3C60003C045';
|
||||
|
||||
/// Existing iOS identifer for Runner PBXProject.
|
||||
/// Existing iOS identifier for Runner PBXProject.
|
||||
static const String _iosProjectIdentifier = '97C146E61CF9000F007C117D';
|
||||
|
||||
/// Existing macOS identifer for Runner PBXProject.
|
||||
/// Existing macOS identifier for Runner PBXProject.
|
||||
static const String _macosProjectIdentifier = '33CC10E52044A3C60003C045';
|
||||
|
||||
File get backupProjectSettings => _fileSystem
|
||||
|
@ -160,7 +160,7 @@ class SwiftPackageManagerIntegrationMigration extends ProjectMigrator {
|
|||
// TODO(vashworth): Add link to instructions on how to manually integrate
|
||||
// once available on website.
|
||||
throwToolExit(
|
||||
'An error occured when adding Swift Package Manager integration:\n'
|
||||
'An error occurred when adding Swift Package Manager integration:\n'
|
||||
' $e\n\n'
|
||||
'Swift Package Manager is currently an experimental feature, please file a bug at\n'
|
||||
' https://github.com/flutter/flutter/issues/new?template=1_activation.yml \n'
|
||||
|
@ -842,7 +842,7 @@ class SchemeInfo {
|
|||
class ParsedProjectInfo {
|
||||
ParsedProjectInfo._({
|
||||
required this.buildFileIdentifiers,
|
||||
required this.fileReferenceIndentifiers,
|
||||
required this.fileReferenceIdentifiers,
|
||||
required this.parsedGroups,
|
||||
required this.frameworksBuildPhases,
|
||||
required this.nativeTargets,
|
||||
|
@ -896,7 +896,7 @@ class ParsedProjectInfo {
|
|||
|
||||
return ParsedProjectInfo._(
|
||||
buildFileIdentifiers: buildFiles,
|
||||
fileReferenceIndentifiers: references,
|
||||
fileReferenceIdentifiers: references,
|
||||
parsedGroups: groups,
|
||||
frameworksBuildPhases: buildPhases,
|
||||
nativeTargets: native,
|
||||
|
@ -911,7 +911,7 @@ class ParsedProjectInfo {
|
|||
List<String> buildFileIdentifiers;
|
||||
|
||||
/// List of identifiers under PBXFileReference section.
|
||||
List<String> fileReferenceIndentifiers;
|
||||
List<String> fileReferenceIdentifiers;
|
||||
|
||||
/// List of [ParsedProjectGroup] items under PBXGroup section.
|
||||
List<ParsedProjectGroup> parsedGroups;
|
||||
|
|
|
@ -298,7 +298,7 @@ Transformation failed, but I forgot to exit with a non-zero code.'''
|
|||
expect(fileSystem.directory('.tmp_rand0').listSync(), isEmpty, reason: 'Transformer did not clean up after itself.');
|
||||
});
|
||||
|
||||
testWithoutContext('prints an error when a transformer in a chain (thats not the first) does not produce an output', () async {
|
||||
testWithoutContext("prints an error when a transformer in a chain (that's not the first) does not produce an output", () async {
|
||||
final FileSystem fileSystem = MemoryFileSystem();
|
||||
final Artifacts artifacts = Artifacts.test();
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ void main() {
|
|||
returnsNormally);
|
||||
});
|
||||
|
||||
testUsingContext('printEmulators prints the emualtors information with header', () {
|
||||
testUsingContext('printEmulators prints the emulators information with header', () {
|
||||
Emulator.printEmulators(emulators, testLogger);
|
||||
|
||||
expect(testLogger.statusText, '''
|
||||
|
|
|
@ -54,12 +54,12 @@ void main() {
|
|||
expectedLines: _expectedLines(
|
||||
platform: platformName,
|
||||
appDirectoryPath: appDirectoryPath,
|
||||
cococapodsPlugin: integrationTestPlugin,
|
||||
cocoaPodsPlugin: integrationTestPlugin,
|
||||
),
|
||||
unexpectedLines: _unexpectedLines(
|
||||
platform: platformName,
|
||||
appDirectoryPath: appDirectoryPath,
|
||||
cococapodsPlugin: integrationTestPlugin,
|
||||
cocoaPodsPlugin: integrationTestPlugin,
|
||||
),
|
||||
);
|
||||
expect(
|
||||
|
@ -164,14 +164,14 @@ void main() {
|
|||
expectedLines: _expectedLines(
|
||||
platform: platformName,
|
||||
appDirectoryPath: appDirectoryPath,
|
||||
cococapodsPlugin: createdCocoaPodsPlugin,
|
||||
cocoaPodsPlugin: createdCocoaPodsPlugin,
|
||||
swiftPackageMangerEnabled: true,
|
||||
swiftPackagePlugin: integrationTestPlugin,
|
||||
),
|
||||
unexpectedLines: _unexpectedLines(
|
||||
platform: platformName,
|
||||
appDirectoryPath: appDirectoryPath,
|
||||
cococapodsPlugin: createdCocoaPodsPlugin,
|
||||
cocoaPodsPlugin: createdCocoaPodsPlugin,
|
||||
swiftPackageMangerEnabled: true,
|
||||
swiftPackagePlugin: integrationTestPlugin,
|
||||
),
|
||||
|
@ -208,12 +208,12 @@ void main() {
|
|||
expectedLines: _expectedLines(
|
||||
platform: platformName,
|
||||
appDirectoryPath: appDirectoryPath,
|
||||
cococapodsPlugin: integrationTestPlugin,
|
||||
cocoaPodsPlugin: integrationTestPlugin,
|
||||
),
|
||||
unexpectedLines: _unexpectedLines(
|
||||
platform: platformName,
|
||||
appDirectoryPath: appDirectoryPath,
|
||||
cococapodsPlugin: integrationTestPlugin,
|
||||
cocoaPodsPlugin: integrationTestPlugin,
|
||||
),
|
||||
);
|
||||
|
||||
|
@ -229,12 +229,12 @@ void main() {
|
|||
expectedLines: _expectedLines(
|
||||
platform: platformName,
|
||||
appDirectoryPath: appDirectoryPath,
|
||||
cococapodsPlugin: integrationTestPlugin,
|
||||
cocoaPodsPlugin: integrationTestPlugin,
|
||||
),
|
||||
unexpectedLines: _unexpectedLines(
|
||||
platform: platformName,
|
||||
appDirectoryPath: appDirectoryPath,
|
||||
cococapodsPlugin: integrationTestPlugin,
|
||||
cocoaPodsPlugin: integrationTestPlugin,
|
||||
),
|
||||
);
|
||||
} finally {
|
||||
|
@ -679,7 +679,7 @@ _Plugin _integrationTestPlugin(String platform) {
|
|||
List<Pattern> _expectedLines({
|
||||
required String platform,
|
||||
required String appDirectoryPath,
|
||||
_Plugin? cococapodsPlugin,
|
||||
_Plugin? cocoaPodsPlugin,
|
||||
_Plugin? swiftPackagePlugin,
|
||||
bool swiftPackageMangerEnabled = false,
|
||||
}) {
|
||||
|
@ -710,14 +710,14 @@ List<Pattern> _expectedLines({
|
|||
]);
|
||||
}
|
||||
}
|
||||
if (cococapodsPlugin != null) {
|
||||
if (cocoaPodsPlugin != null) {
|
||||
expectedLines.addAll(<String>[
|
||||
'Running pod install...',
|
||||
'-> Installing $frameworkName (1.0.0)',
|
||||
'-> Installing ${cococapodsPlugin.pluginName} (0.0.1)',
|
||||
'-> Installing ${cocoaPodsPlugin.pluginName} (0.0.1)',
|
||||
"Target 'Pods-Runner' in project 'Pods'",
|
||||
"➜ Explicit dependency on target '$frameworkName' in project 'Pods'",
|
||||
"➜ Explicit dependency on target '${cococapodsPlugin.pluginName}' in project 'Pods'",
|
||||
"➜ Explicit dependency on target '${cocoaPodsPlugin.pluginName}' in project 'Pods'",
|
||||
]);
|
||||
}
|
||||
return expectedLines;
|
||||
|
@ -726,13 +726,13 @@ List<Pattern> _expectedLines({
|
|||
List<String> _unexpectedLines({
|
||||
required String platform,
|
||||
required String appDirectoryPath,
|
||||
_Plugin? cococapodsPlugin,
|
||||
_Plugin? cocoaPodsPlugin,
|
||||
_Plugin? swiftPackagePlugin,
|
||||
bool swiftPackageMangerEnabled = false,
|
||||
}) {
|
||||
final String frameworkName = platform == 'ios' ? 'Flutter' : 'FlutterMacOS';
|
||||
final List<String> unexpectedLines = <String>[];
|
||||
if (cococapodsPlugin == null) {
|
||||
if (cocoaPodsPlugin == null) {
|
||||
unexpectedLines.addAll(<String>[
|
||||
'Running pod install...',
|
||||
'-> Installing $frameworkName (1.0.0)',
|
||||
|
|
Loading…
Reference in a new issue