• Nate Bosch's avatar
    Remove some ignores for un-deprecated imports (#125261) · 1789a424
    Nate Bosch authored
    The latest version of `test_api` removed the deprecated annotation for a couple libraries. The deprecations had been a hack to avoid usage from inappropriate places, but they cause trouble and likely weren't effective for that goal.
    
    Remove separate import for `registerException` since that was also moved to be available from the top level `scaffolding.dart` library.
    Unverified
    1789a424
test_wrapper.dart 1.15 KB
// 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 'dart:async';

import 'package:test_core/src/executable.dart' as test; // ignore: implementation_imports
import 'package:test_core/src/platform.dart' as hack show registerPlatformPlugin; // ignore: implementation_imports
import 'package:test_core/src/platform.dart'; // ignore: implementation_imports

export 'package:test_api/backend.dart' show Runtime;
export 'package:test_core/src/platform.dart' show PlatformPlugin;

abstract class TestWrapper {
  const factory TestWrapper() = _DefaultTestWrapper;

  Future<void> main(List<String> args);
  void registerPlatformPlugin(Iterable<Runtime> runtimes, FutureOr<PlatformPlugin> Function() platforms);
}

class _DefaultTestWrapper implements TestWrapper {
  const _DefaultTestWrapper();

  @override
  Future<void> main(List<String> args) async {
    await test.main(args);
  }

  @override
  void registerPlatformPlugin(Iterable<Runtime> runtimes, FutureOr<PlatformPlugin> Function() platforms) {
    hack.registerPlatformPlugin(runtimes, platforms);
  }
}