blob: 81658b95a60247d5f223d4ea4da425371bbe5153 [file] [log] [blame]
// Copyright (c) 2018, 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.
import 'package:analyzer/error/error.dart';
import 'package:pub_semver/pub_semver.dart';
import '../dart/resolution/driver_resolution.dart';
/// A base class designed to be used by tests of the hints produced by an
/// SdkConstraintVerifier.
class SdkConstraintVerifierTest extends DriverResolutionTest {
verifyVersion(String version, String source,
{List<ErrorCode> errorCodes}) async {
analysisOptions: analysisOptions
..sdkVersionConstraint = VersionConstraint.parse(version));
await assertErrorsInCode(source, errorCodes ?? []);