Skip to content

Commit

Permalink
Merge pull request #72804 from CyrusNajmabadi/enhanceTest
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrusNajmabadi authored Mar 29, 2024
2 parents 696b3e0 + 8050077 commit ca48b2f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/EditorFeatures/Test/Structure/StructureTaggerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ public class StructureTaggerTests
public async Task CSharpOutliningTagger(
bool collapseRegionsWhenCollapsingToDefinitions,
bool showBlockStructureGuidesForDeclarationLevelConstructs,
bool showBlockStructureGuidesForCodeLevelConstructs)
bool showBlockStructureGuidesForCodeLevelConstructs,
bool showBlockStructureGuidesForCommentsAndPreprocessorRegions)
{
var code =
@"using System;
Expand Down Expand Up @@ -59,6 +60,7 @@ static void Main(string[] args)
globalOptions.SetGlobalOption(BlockStructureOptionsStorage.CollapseRegionsWhenCollapsingToDefinitions, LanguageNames.CSharp, collapseRegionsWhenCollapsingToDefinitions);
globalOptions.SetGlobalOption(BlockStructureOptionsStorage.ShowBlockStructureGuidesForDeclarationLevelConstructs, LanguageNames.CSharp, showBlockStructureGuidesForDeclarationLevelConstructs);
globalOptions.SetGlobalOption(BlockStructureOptionsStorage.ShowBlockStructureGuidesForCodeLevelConstructs, LanguageNames.CSharp, showBlockStructureGuidesForCodeLevelConstructs);
globalOptions.SetGlobalOption(BlockStructureOptionsStorage.ShowBlockStructureGuidesForCommentsAndPreprocessorRegions, LanguageNames.CSharp, showBlockStructureGuidesForCommentsAndPreprocessorRegions);

var tags = await GetTagsFromWorkspaceAsync(workspace);

Expand All @@ -74,7 +76,7 @@ static void Main(string[] args)
{
Assert.Equal(collapseRegionsWhenCollapsingToDefinitions, regionTag.IsImplementation);
Assert.Equal(14, GetCollapsedHintLineCount(regionTag));
Assert.Equal(PredefinedStructureTagTypes.Nonstructural, regionTag.Type);
Assert.Equal(showBlockStructureGuidesForCommentsAndPreprocessorRegions ? PredefinedStructureTagTypes.PreprocessorRegion : PredefinedStructureTagTypes.Nonstructural, regionTag.Type);
Assert.Equal("#region MyRegion", GetHeaderText(regionTag));
},
classTag =>
Expand Down

0 comments on commit ca48b2f

Please sign in to comment.