blob: 7eda0fdf30d9ce4309b3d7a200ed185d2c410e5a [file] [log] [blame]
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. 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.10
import 'package:test/test.dart';
import '../test_pub.dart';
// TODO(sigurdm) consider rewriting all validator tests as integration tests.
// That would make them more robust, and test actual end2end behaviour.
Future<void> expectValidation(ValidatorCreator fn,
{hints, warnings, errors}) async {
final validator = await validatePackage(fn);
expect(validator.errors, errors ?? isEmpty);
expect(validator.warnings, warnings ?? isEmpty);
expect(validator.hints, hints ?? isEmpty);
}