Skip to content

Commit

Permalink
Update test to use ReferenceAssemblies.Net70
Browse files Browse the repository at this point in the history
  • Loading branch information
wzchua committed Aug 27, 2022
1 parent 0d623c8 commit 6c38efb
Showing 1 changed file with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1090,25 +1090,13 @@ private static async Task TestCSAsync(string source, params DiagnosticResult[] d
var test = new VerifyCS.Test
{
TestCode = source,
ReferenceAssemblies = ReferenceAssemblies.Net.Net70,
LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.Preview,
};
// TODO: remove when the type is available
test.TestState.Sources.Add(s_attributeSource);
test.ExpectedDiagnostics.AddRange(diagnosticResults);
await test.RunAsync();
}

private static readonly string s_attributeSource = @"#nullable enable
namespace System.Diagnostics.CodeAnalysis
{
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
public sealed class ConstantExpectedAttribute : Attribute
{
public object? Min { get; set; }
public object? Max { get; set; }
}
}";

private static async Task TestCSMissingAttributeAsync(string source, params DiagnosticResult[] diagnosticResults)
{
var test = new VerifyCS.Test
Expand Down

0 comments on commit 6c38efb

Please sign in to comment.