/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/FunctionPointerUnmanagedCallingConventionCompletionProviderTests.cs
66 строк
2 KB
Cyrus Najmabadi
Make tests synchronous
08 июл 2025, 22:11
08 июл 2025, 22:11
542bfda
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. #nullable disable using System; using System.Threading.Tasks; using Microsoft.CodeAnalysis.CSharp.Completion.Providers; using Microsoft.CodeAnalysis.Test.Utilities; using Xunit; namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.Completion.CompletionProviders; [Trait(Traits.Feature, Traits.Features.Completion)] public sealed class FunctionPointerUnmanagedCallingConventionCompletionProviderTests : AbstractCSharpCompletionProviderTests { internal override Type GetCompletionProviderType() => typeof(FunctionPointerUnmanagedCallingConventionCompletionProvider); [Fact] public Task TypeFound() => VerifyItemExistsAsync(""" namespace System.Runtime.CompilerServices { public class CallConvUnitTest { } } class C { delegate* unmanaged[$$] <int, string> f; } """, "UnitTest"); [Fact] public Task TypeFoundSecondCallingConvention() => VerifyItemExistsAsync(""" namespace System.Runtime.CompilerServices { public class CallConvUnitTest { } } class C { delegate* unmanaged[Thiscall, $$] <int, string> f; } """, "UnitTest"); [Theory] [InlineData("Cdecl")] [InlineData("Fastcall")] [InlineData("Thiscall")] [InlineData("Stdcall")] public Task PredefinedCallingConventionFound(string callingConvention) => VerifyItemExistsAsync(""" <Workspace> <Project Language="C#"> <Document> class C { delegate* unmanaged[$$] <int, string> f; } </Document> </Project> </Workspace> """, callingConvention, glyph: Glyph.Keyword); }