/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/EditorFeatures/CSharpTest/Organizing/OrganizeModifiersTests.cs
75 строк
2 KB
Cyrus Najmabadi
Use raw strings in tests
09 июл 2025, 08:52
09 июл 2025, 08:52
f265dce
Код
Авторство
О чём код?
// 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.Threading.Tasks; using Microsoft.CodeAnalysis.Test.Utilities; using Xunit; namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.Organizing; [Trait(Traits.Feature, Traits.Features.Organizing)] public sealed class OrganizeModifiersTests : AbstractOrganizerTests { [Theory] [InlineData("class")] [InlineData("record")] public Task TestTypes1(string typeKind) => CheckAsync($$""" static public {{typeKind}} C { } """, $$""" public static {{typeKind}} C { } """); [Theory] [InlineData("class")] [InlineData("record")] public Task TestTypes2(string typeKind) => CheckAsync($$""" public static {{typeKind}} D { } """, $$""" public static {{typeKind}} D { } """); [Theory] [InlineData("class")] [InlineData("record")] public Task TestTypes3(string typeKind) => CheckAsync($$""" public static partial {{typeKind}} E { } """, $$""" public static partial {{typeKind}} E { } """); [Theory] [InlineData("class")] [InlineData("record")] public Task TestTypes4(string typeKind) => CheckAsync($$""" static public partial {{typeKind}} F { } """, $$""" public static partial {{typeKind}} F { } """); [Theory] [InlineData("class")] [InlineData("record")] public Task TestTypes5(string typeKind) => CheckAsync($$""" unsafe public static {{typeKind}} F { } """, $$""" public static unsafe {{typeKind}} F { } """); }