flutter/packages/flutter_tools/test/general.shard/commands/build_test.dart
Matan Lurey d8856b9e50
Remove the last vestiges of null-unsafety in flutter_tools. (#164026)
The internal code using this was deleted in `cl/730558889`.
2025-02-27 16:31:22 +00:00

32 lines
1.1 KiB
Dart

// 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.
import 'package:args/command_runner.dart';
import 'package:file/memory.dart';
import 'package:flutter_tools/src/base/logger.dart';
import 'package:flutter_tools/src/build_system/build_system.dart';
import 'package:flutter_tools/src/commands/build.dart';
import '../../src/common.dart';
import '../../src/context.dart';
import '../../src/fakes.dart';
import '../../src/test_build_system.dart';
void main() {
testUsingContext('Include only supported sub commands', () {
final BufferLogger logger = BufferLogger.test();
final MemoryFileSystem fs = MemoryFileSystem.test();
final BuildCommand command = BuildCommand(
androidSdk: FakeAndroidSdk(),
buildSystem: TestBuildSystem.all(BuildResult(success: true)),
fileSystem: fs,
logger: logger,
osUtils: FakeOperatingSystemUtils(),
);
for (final Command<void> x in command.subcommands.values) {
expect((x as BuildSubCommand).supported, isTrue);
}
});
}