• stuartmorgan's avatar
    Add Windows unit tests to plugin template (#118638) · e3c51a2f
    stuartmorgan authored
    * Add Windows unit tests to plugin template
    
    Adds an example native unit test to the plugin template for Windows,
    matching the format we use for our 1P plugin example app unit tests.
    Once these have been added for all platforms+languages, they will be
    documented on a new plugin development page to explain their use.
    
    Since we don't appear to be running our current plugin e2e tests for
    Windows, this adds a new configuration to run them. I haven't
    `led`-tested this, so it may not work, but this will give a starting
    point for getting them running.
    
    Part of https://github.com/flutter/flutter/issues/82458
    
    * Minor fix
    
    * Add test owner
    
    * Fix typo
    
    * Fix test feature flag
    e3c51a2f
plugin_test_windows.dart 696 Bytes
// 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:flutter_devicelab/framework/framework.dart';
import 'package:flutter_devicelab/tasks/plugin_tests.dart';

Future<void> main() async {
  await task(combine(<TaskFunction>[
    PluginTest('windows', <String>['--platforms=windows']).call,
    // Test that Dart-only plugins are supported.
    PluginTest('windows', <String>['--platforms=windows'], dartOnlyPlugin: true).call,
    // Test that FFI plugins are supported.
    PluginTest('windows', <String>['--platforms=windows'], template: 'plugin_ffi').call,
  ]));
}