public async Task VerifyNoDiagnosticAsync( string source, IEnumerable <string> additionalFiles = null, TestOptions options = null, CancellationToken cancellationToken = default) { var state = new DiagnosticTestState( Descriptor, source, spans: null, additionalFiles: AdditionalFile.CreateRange(additionalFiles)); await VerifyNoDiagnosticAsync( state, options : options, cancellationToken); }
internal async Task VerifyDiagnosticAsync( string source, TextSpan span, IEnumerable <string> additionalFiles = null, TestOptions options = null, CancellationToken cancellationToken = default) { var state = new DiagnosticTestState( Descriptor, source, ImmutableArray.Create(span), additionalFiles: AdditionalFile.CreateRange(additionalFiles)); await VerifyDiagnosticAsync( state, options : options, cancellationToken : cancellationToken); }
public async Task VerifyDiagnosticAsync( string source, IEnumerable <string> additionalFiles = null, TestOptions options = null, CancellationToken cancellationToken = default) { var code = TestCode.Parse(source); Debug.Assert(code.Spans.Length > 0); var state = new DiagnosticTestState( Descriptor, code.Value, code.Spans, code.AdditionalSpans, additionalFiles: AdditionalFile.CreateRange(additionalFiles)); await VerifyDiagnosticAsync( state, options : options, cancellationToken : cancellationToken); }