提交 36a1f9c9 编写于 作者: J Jason Malinowski 提交者: GitHub

Merge pull request #20814 from jasonmalinowski/enable-xunit-analyzers

Enable xunit analyzers
......@@ -126,4 +126,15 @@
<Rules AnalyzerId="Microsoft.NetCore.Analyzers" RuleNamespace="Microsoft.NetCore.Analyzers">
<Rule Id="CA9999" Action="None" /> <!-- We know the analyzers will fail during a bootstrap build -->
</Rules>
<Rules AnalyzerId="xunit.analyzers" RuleNamespace="Xunit.Analyzers">
<Rule Id="xUnit1004" Action="None" /> <!-- allow skipped tests -->
<Rule Id="xUnit1024" Action="None" /> <!-- seems broken: https://github.com/xunit/xunit/issues/1361 -->
<Rule Id="xUnit2000" Action="None" /> <!-- "literal or constant value should be first in Assert.Equal" is a valid assert, but very noisy. Will do the refactoring later -->
<Rule Id="xUnit2002" Action="None" /> <!-- "do not use Assert.NonNull on struct" is a valid assert, but will require a codebase audit to turn on -->
<Rule Id="xUnit2003" Action="None" /> <!-- "do not use Assert.Equal for null value" is a valid assert, but very noisy right now -->
<Rule Id="xUnit2004" Action="None" /> <!-- "do not use Assert.Equal for boolean conditions" is a valid assert, but very noisy right now -->
<Rule Id="xUnit2006" Action="None" /> <!-- "do not use generic Assert.Equal to test string equality" is a valid assert, but very noisy right now -->
<Rule Id="xUnit2007" Action="None" /> <!-- "do not use Assert.IsType(typeof...)" is a valid assert, but very noisy right now -->
<Rule Id="xUnit2009" Action="None" /> <!-- "do not use Assert.True to check for substrings" is a valid assert, but very noisy right now -->
</Rules>
</RuleSet>
......@@ -224,6 +224,7 @@
<VsWebsiteInteropVersion>8.0.0.0-alpha</VsWebsiteInteropVersion>
<vswhereVersion>1.0.71</vswhereVersion>
<xunitVersion>2.2.0-beta4-build3444</xunitVersion>
<xunitanalyzersVersion>0.5.0</xunitanalyzersVersion>
<xunitassertVersion>2.2.0-beta4-build3444</xunitassertVersion>
<xunitconsolenetcoreVersion>1.0.2-prerelease-00104</xunitconsolenetcoreVersion>
<xunitrunnerconsoleVersion>2.2.0-beta4-build3444</xunitrunnerconsoleVersion>
......
......@@ -17,6 +17,7 @@
<PackageReference Include="Microsoft.Net.RoslynDiagnostics" Version="$(MicrosoftNetRoslynDiagnosticsVersion)" />
<PackageReference Include="FakeSign" Version="$(FakeSignVersion)" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
<PackageReference Include="Roslyn.Build.Util" Version="$(RoslynBuildUtilVersion)" />
<PackageReference Include="RoslynDependencies.OptimizationData" Version="$(RoslynDependenciesOptimizationDataVersion)" />
......
......@@ -26,7 +26,8 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'" />
<ItemGroup>
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<Import Project="..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -26,7 +26,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<Import Project="..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -25,6 +25,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'" />
<ItemGroup>
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<Import Project="..\..\..\..\build\Targets\Imports.targets" />
......
......@@ -35,6 +35,7 @@
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup>
......@@ -59,4 +60,4 @@
</EmbeddedResource>
</ItemGroup>
<Import Project="..\..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -47,6 +47,7 @@
<Reference Include="System.Xml.Linq" />
<PackageReference Include="Microsoft.DiaSymReader" Version="$(MicrosoftDiaSymReaderVersion)" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup>
......@@ -60,4 +61,4 @@
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="..\..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -3487,6 +3487,7 @@ namespace System.Runtime.CompilerServices { class AsyncMethodBuilderAttribute :
);
}
[Fact]
public void AsyncTasklikeBadAttributeArgument4()
{
var source = @"
......@@ -3851,7 +3852,7 @@ namespace System.Runtime.CompilerServices { class AsyncMethodBuilderAttribute :
}
// Should check constraints (see https://github.com/dotnet/roslyn/issues/12616).
//[Fact]
[Fact(Skip = "https://github.com/dotnet/roslyn/issues/12616")]
public void AsyncTasklikeBuilderConstraints()
{
var source1 = @"
......
......@@ -2838,6 +2838,7 @@ static void Main()
);
}
[Fact]
[WorkItem(16947, "https://github.com/dotnet/roslyn/issues/16947")]
public void Dynamic001()
{
......@@ -2867,6 +2868,8 @@ public void M()
Diagnostic(ErrorCode.ERR_RefReturnLvalueExpected, "d.Length").WithLocation(14, 20)
);
}
[Fact]
[WorkItem(16947, "https://github.com/dotnet/roslyn/issues/16947")]
public void Dynamic002()
{
......@@ -2897,6 +2900,7 @@ public void M()
);
}
[Fact(Skip = "https://github.com/dotnet/roslyn/issues/21079")]
[WorkItem(16947, "https://github.com/dotnet/roslyn/issues/16947")]
public void Dynamic003()
{
......
......@@ -81,6 +81,7 @@ .maxstack 1
");
}
[Fact(Skip = "https://github.com/dotnet/roslyn/issues/21079")]
public void TestRethrowImplicit()
{
var source = @"
......@@ -121,6 +122,7 @@ .maxstack 1
");
}
[Fact(Skip = "https://github.com/dotnet/roslyn/issues/21079")]
public void TestRethrowTyped()
{
var source = @"
......@@ -161,6 +163,7 @@ .maxstack 1
");
}
[Fact(Skip = "https://github.com/dotnet/roslyn/issues/21079")]
public void TestRethrowNamed()
{
var source = @"
......@@ -201,6 +204,7 @@ .maxstack 1
");
}
[Fact]
public void TestRethrowModified()
{
var source = @"
......@@ -234,6 +238,7 @@ static void Main()
CompileAndVerify(source, expectedOutput: "B");
}
[Fact]
public void TestRethrowOverwritten()
{
var source = @"
......
......@@ -895,6 +895,7 @@ .maxstack 2
);
}
[Fact]
public void DegenerateSwitch007()
{
var text = @"using System;
......
......@@ -8493,6 +8493,7 @@ .locals init (pinned char*& V_0)
");
}
[Fact]
public void FixedBufferAndStatementWithFixedArrayElementAsInitializerExe()
{
var text = @"
......
......@@ -491,7 +491,7 @@ class C
Diagnostic(ErrorCode.ERR_ModuleEmitFailure).WithArguments("C"));
}
public void VerifyAssemblyReferences(AggregatedMetadataReader reader, string[] expected)
private void VerifyAssemblyReferences(AggregatedMetadataReader reader, string[] expected)
{
AssertEx.Equal(expected, reader.GetAssemblyReferences().Select(aref => $"{reader.GetString(aref.Name)}, {aref.Version}"));
}
......
......@@ -6795,6 +6795,7 @@ static void M()
#region Patterns
[Fact(Skip = "https://github.com/dotnet/roslyn/issues/21079")]
public void SyntaxOffset_Pattern()
{
var source = @"class C { bool F(object o) => o is int i && o is 3 && o is bool; }";
......
......@@ -32,10 +32,11 @@
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="..\..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -136,6 +136,7 @@ static void M1()
VerifyOperationTreeAndDiagnosticsForTest<InvocationExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics);
}
[Fact(Skip = "https://github.com/dotnet/roslyn/issues/21079")]
public void NamedArgumentInParameterOrderWithDefaultValue()
{
string source = @"
......
......@@ -22445,6 +22445,7 @@ static void Main(string[] args)
}
[WorkItem(543473, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/543473")]
[Fact]
public void CS0815ERR_CannotAssignLambdaExpressionToAnImplicitlyTypedLocalVariable()
{
var text =
......
......@@ -31,7 +31,8 @@
<ItemGroup>
<PackageReference Include="System.Linq.Parallel" Version="$(SystemLinqParallelVersion)" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<Import Project="..\..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -1275,6 +1275,8 @@ public void TestNumericLiteralWithHugeNumberAndDecimal()
Assert.Equal(value, token.Value);
}
[Fact]
[Trait("Feature", "Literals")]
public void TestNumericLiteralWithHugeNumberAndHugeDecimal()
{
var value = 12332434234234234234234234324234234234.45623423423423423423423423423423423423;
......
......@@ -2013,7 +2013,7 @@ public void TestDelegateWithBuiltInReturnTypes()
TestDelegateWithBuiltInReturnType(SyntaxKind.ObjectKeyword);
}
public void TestDelegateWithBuiltInReturnType(SyntaxKind builtInType)
private void TestDelegateWithBuiltInReturnType(SyntaxKind builtInType)
{
var typeText = SyntaxFacts.GetText(builtInType);
var text = "delegate " + typeText + " b();";
......@@ -2059,7 +2059,7 @@ public void TestDelegateWithBuiltInParameterTypes()
TestDelegateWithBuiltInParameterType(SyntaxKind.ObjectKeyword);
}
public void TestDelegateWithBuiltInParameterType(SyntaxKind builtInType)
private void TestDelegateWithBuiltInParameterType(SyntaxKind builtInType)
{
var typeText = SyntaxFacts.GetText(builtInType);
var text = "delegate a b(" + typeText + " c);";
......@@ -2482,6 +2482,7 @@ public void TestClassMethodWithRefReturn()
Assert.Equal(SyntaxKind.None, ms.SemicolonToken.Kind());
}
[Fact]
public void TestClassMethodWithRef()
{
var text = "class a { ref }";
......@@ -2876,7 +2877,7 @@ public void TestClassMethodWithBuiltInReturnTypes()
TestClassMethodWithBuiltInReturnType(SyntaxKind.ObjectKeyword);
}
public void TestClassMethodWithBuiltInReturnType(SyntaxKind type)
private void TestClassMethodWithBuiltInReturnType(SyntaxKind type)
{
var typeText = SyntaxFacts.GetText(type);
var text = "class a { " + typeText + " M() { } }";
......@@ -2941,7 +2942,7 @@ public void TestClassMethodWithBuiltInParameterTypes()
TestClassMethodWithBuiltInParameterType(SyntaxKind.ObjectKeyword);
}
public void TestClassMethodWithBuiltInParameterType(SyntaxKind type)
private void TestClassMethodWithBuiltInParameterType(SyntaxKind type)
{
var typeText = SyntaxFacts.GetText(type);
var text = "class a { b X(" + typeText + " c) { } }";
......@@ -3299,7 +3300,7 @@ public void TestClassFieldWithBuiltInTypes()
TestClassFieldWithBuiltInType(SyntaxKind.ObjectKeyword);
}
public void TestClassFieldWithBuiltInType(SyntaxKind type)
private void TestClassFieldWithBuiltInType(SyntaxKind type)
{
var typeText = SyntaxFacts.GetText(type);
var text = "class a { " + typeText + " c; }";
......@@ -3873,7 +3874,7 @@ public void TestClassPropertyWithBuiltInTypes()
TestClassPropertyWithBuiltInType(SyntaxKind.ObjectKeyword);
}
public void TestClassPropertyWithBuiltInType(SyntaxKind type)
private void TestClassPropertyWithBuiltInType(SyntaxKind type)
{
var typeText = SyntaxFacts.GetText(type);
var text = "class a { " + typeText + " c { get; set; } }";
......@@ -4065,7 +4066,7 @@ public void TestClassPropertyOrEventWithValue()
TestClassEventWithValue(SyntaxKind.RemoveAccessorDeclaration, SyntaxKind.RemoveKeyword, SyntaxKind.IdentifierToken);
}
public void TestClassPropertyWithValue(SyntaxKind accessorKind, SyntaxKind accessorKeyword, SyntaxKind tokenKind)
private void TestClassPropertyWithValue(SyntaxKind accessorKind, SyntaxKind accessorKeyword, SyntaxKind tokenKind)
{
bool isEvent = accessorKeyword == SyntaxKind.AddKeyword || accessorKeyword == SyntaxKind.RemoveKeyword;
var text = "class a { " + (isEvent ? "event" : string.Empty) + " b c { " + SyntaxFacts.GetText(accessorKeyword) + " { x = value; } } }";
......@@ -4122,7 +4123,7 @@ public void TestClassPropertyWithValue(SyntaxKind accessorKind, SyntaxKind acces
Assert.Equal(tokenKind, ((IdentifierNameSyntax)bx.Right).Identifier.Kind());
}
public void TestClassEventWithValue(SyntaxKind accessorKind, SyntaxKind accessorKeyword, SyntaxKind tokenKind)
private void TestClassEventWithValue(SyntaxKind accessorKind, SyntaxKind accessorKeyword, SyntaxKind tokenKind)
{
var text = "class a { event b c { " + SyntaxFacts.GetText(accessorKeyword) + " { x = value; } } }";
var file = this.ParseFile(text);
......
......@@ -1852,6 +1852,7 @@ public void TestFromOrderByDescendingSelect()
Assert.Null(qs.Body.Continuation);
}
[Fact(Skip = "https://github.com/dotnet/roslyn/issues/21079")]
public void TestFromGroupBy()
{
var text = "from a in A group b by c";
......@@ -1891,6 +1892,7 @@ public void TestFromGroupBy()
Assert.Null(qs.Body.Continuation);
}
[Fact(Skip = "https://github.com/dotnet/roslyn/issues/21079")]
public void TestFromGroupByIntoSelect()
{
var text = "from a in A group b by c into d select e";
......
......@@ -4395,6 +4395,7 @@ void M()
Diagnostic(ErrorCode.ERR_InvalidExprTerm, "stackalloc").WithArguments("stackalloc").WithLocation(6, 24));
}
[Fact]
public void CS1674ERR_StackAllocInUsing1()
{
// Diff errors
......
......@@ -169,7 +169,7 @@ public void LexerTooManyBadTokens_LongUnicode()
#region "Helpers"
public static void ParseAndValidate(string text, params DiagnosticDescription[] expectedErrors)
private static void ParseAndValidate(string text, params DiagnosticDescription[] expectedErrors)
{
var parsedTree = ParseWithRoundTripCheck(text);
var actualErrors = parsedTree.GetDiagnostics();
......
......@@ -46,7 +46,7 @@ internal static void ParseAndRoundTripping(string text, CSharpParseOptions optio
ParentChecker.CheckParents(tree.GetCompilationUnitRoot(), tree);
}
public static void ParseAndCheckTerminalSpans(string text)
private static void ParseAndCheckTerminalSpans(string text)
{
var tree = SyntaxFactory.ParseSyntaxTree(text);
var toText = tree.GetCompilationUnitRoot().ToFullString();
......
......@@ -21,12 +21,12 @@ protected override SyntaxTree ParseTree(string text, CSharpParseOptions options)
return SyntaxFactory.ParseSyntaxTree(text, options: options ?? TestOptions.Script);
}
public void ParseAndValidate(string text, params ErrorDescription[] errors)
private void ParseAndValidate(string text, params ErrorDescription[] errors)
{
ParseAndValidate(text, null, errors);
}
public SyntaxTree ParseAndValidate(string text, CSharpParseOptions options, params ErrorDescription[] errors)
private SyntaxTree ParseAndValidate(string text, CSharpParseOptions options, params ErrorDescription[] errors)
{
var parsedTree = ParseTree(text, options);
var parsedText = parsedTree.GetCompilationUnitRoot();
......
......@@ -263,6 +263,7 @@ public void TestLocalDeclarationStatementWithTuple()
Assert.False(ds.SemicolonToken.IsMissing);
}
[Fact]
public void TestLocalDeclarationStatementWithNamedTuple()
{
var text = "(T x, (U k, V l, W m) y) a;";
......
......@@ -29,10 +29,11 @@
<ItemGroup>
<Reference Include="System.Xml.Linq" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="..\..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -36,6 +36,7 @@
<Reference Include="System" />
<Reference Include="System.Xml" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
<PackageReference Include="Moq" Version="$(MoqVersion)" />
</ItemGroup>
......@@ -63,4 +64,4 @@
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -6,7 +6,7 @@
namespace Microsoft.CodeAnalysis.UnitTests.Collections
{
internal class ArrayBuilderTests
public class ArrayBuilderTests
{
[Fact]
public void RemoveDuplicates1()
......
......@@ -32,6 +32,7 @@
<Reference Include="System" />
<Reference Include="System.Xml" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
<PackageReference Include="System.Collections.Immutable" Version="$(SystemCollectionsImmutableVersion)" />
<PackageReference Include="Microsoft.Build" Version="$(MicrosoftBuildFixedVersion)" />
......@@ -41,4 +42,4 @@
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -38,10 +38,11 @@
<PackageReference Include="Microsoft.DiaSymReader" Version="$(MicrosoftDiaSymReaderVersion)" />
<PackageReference Include="Moq" Version="$(MoqVersion)" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -32,6 +32,7 @@
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup>
......@@ -88,4 +89,4 @@
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="..\..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -31,6 +31,7 @@
<Reference Include="Microsoft.VisualBasic" />
<PackageReference Include="Microsoft.DiaSymReader" Version="$(MicrosoftDiaSymReaderVersion)" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup>
......@@ -132,4 +133,4 @@
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="..\..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -30,6 +30,7 @@
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup>
......@@ -84,4 +85,4 @@
<Compile Remove="Semantics\PrintResultTestSource.vb" />
</ItemGroup>
<Import Project="..\..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -30,6 +30,7 @@
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup>
......@@ -47,4 +48,4 @@
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="..\..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -35,6 +35,7 @@
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup>
......@@ -66,4 +67,4 @@
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="..\..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -423,6 +423,7 @@ void Method()
}
}
[WpfFact, Trait(Traits.Feature, Traits.Features.AutomaticCompletion)]
public void Preprocessor2()
{
var code = @"class C
......@@ -440,6 +441,7 @@ void Method()
}
}
[WpfFact, Trait(Traits.Feature, Traits.Features.AutomaticCompletion)]
public void Preprocessor3()
{
var code = @"class C
......
......@@ -2602,6 +2602,7 @@ public override int foo
}
[WorkItem(8257, "https://github.com/dotnet/roslyn/issues/8257")]
[WpfFact, Trait(Traits.Feature, Traits.Features.Completion)]
public async Task NotImplementedQualifiedWhenSystemUsingNotPresent_Method()
{
var markupBeforeCommit = @"abstract class C
......
......@@ -29,6 +29,7 @@ public async Task SnippetsInEmptyFile()
await VerifyItemExistsAsync(@"$$", MockSnippetInfoService.SnippetShortcut, sourceCodeKind: SourceCodeKind.Regular);
}
[Fact, Trait(Traits.Feature, Traits.Features.Completion)]
public async Task SnippetDescriptions()
{
await VerifyItemExistsAsync(@"$$", MockSnippetInfoService.SnippetShortcut, MockSnippetInfoService.SnippetTitle + Environment.NewLine + MockSnippetInfoService.SnippetDescription, SourceCodeKind.Regular);
......
......@@ -334,7 +334,7 @@ enum Color
}");
}
[Trait(Traits.Feature, Traits.Features.CodeActionsGenerateEnumMember)]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateEnumMember)]
public async Task TestWithNonZeroInteger()
{
await TestInRegularAndScriptAsync(
......
......@@ -322,6 +322,7 @@ internal interface
", new TestParameters(options: InterfaceNamesStartWithI));
}
[Fact, Trait(Traits.Feature, Traits.Features.NamingStyle)]
[WorkItem(16562, "https://github.com/dotnet/roslyn/issues/16562")]
public async Task TestRefactorNotify()
{
......
......@@ -1591,7 +1591,7 @@ void M()
}
[WorkItem(7900, "https://github.com/dotnet/roslyn/issues/7900")]
[Trait(Traits.Feature, Traits.Features.Formatting)]
[WpfFact, Trait(Traits.Feature, Traits.Features.Formatting)]
public void FormatLockStatementWithEmbeddedStatementOnSemicolonDifferentLine()
{
var code = @"class C
......@@ -1616,7 +1616,7 @@ public void M()
}
[WorkItem(7900, "https://github.com/dotnet/roslyn/issues/7900")]
[Trait(Traits.Feature, Traits.Features.Formatting)]
[WpfFact, Trait(Traits.Feature, Traits.Features.Formatting)]
public void FormatLockStatementWithEmbeddedStatementOnSemicolonSameLine()
{
var code = @"class C
......
......@@ -91,7 +91,7 @@ public async Task TestGetCodeFixWithExceptionInGetFixAllProvider()
await GetAddedFixesAsync(new ErrorCases.ExceptionInGetFixAllProvider());
}
public async Task GetDefaultFixesAsync(CodeFixProvider codefix)
private async Task GetDefaultFixesAsync(CodeFixProvider codefix)
{
var tuple = ServiceSetup(codefix);
using (var workspace = tuple.Item1)
......@@ -103,7 +103,7 @@ public async Task GetDefaultFixesAsync(CodeFixProvider codefix)
}
}
public async Task GetAddedFixesAsync(CodeFixProvider codefix)
private async Task GetAddedFixesAsync(CodeFixProvider codefix)
{
var tuple = ServiceSetup(codefix);
using (var workspace = tuple.Item1)
......@@ -121,7 +121,7 @@ public async Task GetAddedFixesAsync(CodeFixProvider codefix)
}
}
public async Task GetFirstDiagnosticWithFixAsync(CodeFixProvider codefix)
private async Task GetFirstDiagnosticWithFixAsync(CodeFixProvider codefix)
{
var tuple = ServiceSetup(codefix);
using (var workspace = tuple.Item1)
......
......@@ -31,7 +31,7 @@ public async Task TestExceptionInComputeRefactoringsAsync()
await VerifyRefactoringDisabledAsync(new ErrorCases.ExceptionInComputeRefactoringsAsync());
}
public async Task VerifyRefactoringDisabledAsync(CodeRefactoringProvider codeRefactoring)
private async Task VerifyRefactoringDisabledAsync(CodeRefactoringProvider codeRefactoring)
{
var refactoringService = new CodeRefactorings.CodeRefactoringService(GetMetadata(codeRefactoring));
using (var workspace = TestWorkspace.CreateCSharp(@"class Program {}"))
......
......@@ -382,7 +382,7 @@ public async Task Document_Reanalyze()
}
}
[WorkItem(670335, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/670335")]
[Fact, WorkItem(670335, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/670335")]
public async Task Document_Change()
{
using (var workspace = new WorkCoordinatorWorkspace(SolutionCrawler))
......@@ -427,7 +427,7 @@ public async Task Document_AdditionalFileChange()
}
}
[WorkItem(670335, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/670335")]
[Fact, WorkItem(670335, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/670335")]
public async Task Document_Cancellation()
{
using (var workspace = new WorkCoordinatorWorkspace(SolutionCrawler))
......@@ -457,7 +457,7 @@ public async Task Document_Cancellation()
}
}
[WorkItem(670335, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/670335")]
[Fact, WorkItem(670335, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/670335")]
public async Task Document_Cancellation_MultipleTimes()
{
using (var workspace = new WorkCoordinatorWorkspace(SolutionCrawler))
......@@ -491,7 +491,7 @@ public async Task Document_Cancellation_MultipleTimes()
}
}
[WorkItem(670335, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/670335")]
[Fact(Skip = "https://github.com/dotnet/roslyn/issues/21082"), WorkItem(670335, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/670335")]
public async Task Document_InvocationReasons()
{
using (var workspace = new WorkCoordinatorWorkspace(SolutionCrawler))
......
......@@ -237,13 +237,13 @@ private void VerifyBreakIntoCharacterParts(string original, params string[] part
[InlineData("my[|_b|]utton", "_B", PatternMatchKind.CamelCaseSubstring, CaseInsensitive)]
[InlineData("[|_|]my_[|b|]utton", "_B", PatternMatchKind.CamelCaseNonContiguousPrefix, CaseInsensitive)]
public void TestNonFuzzyMatch(
string candidate, string pattern, int matchKindInt, bool isCaseSensitive)
// Test is internal as PatternMatchKind is internal, but this is still ran.
internal void TestNonFuzzyMatch(
string candidate, string pattern, PatternMatchKind matchKind, bool isCaseSensitive)
{
var match = TestNonFuzzyMatch(candidate, pattern);
Assert.NotNull(match);
var matchKind = (PatternMatchKind)matchKindInt;
Assert.Equal(matchKind, match.Value.Kind);
Assert.Equal(isCaseSensitive, match.Value.IsCaseSensitive);
}
......
......@@ -52,6 +52,7 @@
<Reference Include="System.Xml.Linq" />
<Reference Include="WindowsBase" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
<PackageReference Include="Moq" Version="$(MoqVersion)" />
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
......
......@@ -37,6 +37,7 @@
<PackageReference Include="Microsoft.VisualStudio.Debugger.Engine" Version="$(MicrosoftVisualStudioDebuggerEngineVersion)" />
<PackageReference Include="Microsoft.DiaSymReader" Version="$(MicrosoftDiaSymReaderVersion)" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup>
......@@ -48,4 +49,4 @@
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="..\..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -12,10 +12,10 @@
namespace Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.UnitTests
{
internal class AccessibilityTests : CSharpResultProviderTestBase
public class AccessibilityTests : CSharpResultProviderTestBase
{
[WorkItem(889710, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/889710")]
[Fact]
[Fact(Skip = "https://github.com/dotnet/roslyn/issues/21084")]
public void HideNonPublicMembersBaseClass()
{
var sourceA =
......@@ -176,7 +176,7 @@ class C
}
[WorkItem(889710, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/889710")]
[Fact]
[Fact(Skip = "https://github.com/dotnet/roslyn/issues/21084")]
public void HideNonPublicMembersDerivedClass()
{
var sourceA =
......
......@@ -33,6 +33,7 @@
<Reference Include="System" />
<Reference Include="System.Xml" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup>
......@@ -45,4 +46,4 @@
</ItemGroup>
<Import Project="..\..\Source\ResultProvider\CSharpResultProvider.projitems" Label="Shared" />
<Import Project="..\..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -17,6 +17,7 @@
<PackageReference Include="Microsoft.VisualStudio.Debugger.Engine" Version="$(MicrosoftVisualStudioDebuggerEngineVersion)" />
<PackageReference Include="Microsoft.DiaSymReader" Version="$(MicrosoftDiaSymReaderVersion)" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup Label="Project References">
......@@ -58,4 +59,4 @@
</EmbeddedResource>
</ItemGroup>
<Import Project="..\..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -36,7 +36,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Debugger.Engine" Version="$(MicrosoftVisualStudioDebuggerEngineVersion)" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<Import Project="..\..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -26,6 +26,7 @@
<PackageReference Include="System.Collections.Immutable" Version="$(SystemCollectionsImmutableVersion)" />
<PackageReference Include="Microsoft.VisualStudio.Debugger.Metadata" Version="$(MicrosoftVisualStudioDebuggerMetadataVersion)" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup Label="Linked Files">
......
......@@ -36,6 +36,7 @@
<PackageReference Include="Microsoft.VisualStudio.Debugger.Engine" Version="$(MicrosoftVisualStudioDebuggerEngineVersion)" />
<PackageReference Include="Microsoft.DiaSymReader" Version="$(MicrosoftDiaSymReaderVersion)" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup>
......@@ -45,4 +46,4 @@
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="..\..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -34,6 +34,7 @@
<Reference Include="System" />
<Reference Include="System.Xml" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup>
......@@ -46,4 +47,4 @@
</ItemGroup>
<Import Project="..\..\Source\ResultProvider\BasicResultProvider.projitems" Label="Shared" />
<Import Project="..\..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -118,14 +118,14 @@ public string ReadErrorOutputToEnd()
return ReadOutputToEnd(isError: true);
}
public void ClearOutput()
private void ClearOutput()
{
_outputReadPosition = new int[] { 0, 0 };
_synchronizedOutput.Clear();
_synchronizedErrorOutput.Clear();
}
public void RestartHost(string rspFile = null)
private void RestartHost(string rspFile = null)
{
ClearOutput();
......
......@@ -10,7 +10,7 @@
namespace Microsoft.CodeAnalysis.UnitTests.Interactive
{
public sealed class StressTests : AbstractInteractiveHostTests, IDisposable
public sealed class StressTests : AbstractInteractiveHostTests
{
private readonly List<InteractiveHost> _processes = new List<InteractiveHost>();
private readonly List<Thread> _threads = new List<Thread>();
......
......@@ -28,7 +28,8 @@
<Reference Include="System" />
<Reference Include="System.Core" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<Import Project="..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -31,10 +31,11 @@
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="..\..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -34,7 +34,8 @@
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<Import Project="..\..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -32,10 +32,11 @@
<Reference Include="System.Xml.Linq" />
<PackageReference Include="Moq" Version="$(MoqVersion)" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<Import Project="..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -32,10 +32,11 @@
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup>
<Import Include="System.Xml.Linq" />
</ItemGroup>
<Import Project="..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -38,10 +38,11 @@
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup>
<Import Include="System.Xml.Linq" />
</ItemGroup>
<Import Project="..\..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -40,7 +40,8 @@
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<Import Project="..\..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -41,10 +41,11 @@
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup>
<Import Include="System.Xml.Linq" />
</ItemGroup>
<Import Project="..\..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -708,7 +708,7 @@ public void DebuggerProxy_FrameworkTypes_Lazy()
);
}
public void TaskMethod()
private void TaskMethod()
{
}
......
......@@ -16,7 +16,7 @@ namespace Microsoft.CodeAnalysis.Scripting.Hosting.UnitTests
{
// TODO: clean up and move to portable tests
public class MetadataShadowCopyProviderTests : TestBase, IDisposable
public class MetadataShadowCopyProviderTests : TestBase
{
private readonly MetadataShadowCopyProvider _provider;
......
......@@ -35,7 +35,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<Import Project="..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -43,7 +43,8 @@
<PackageReference Include="System.Xml.XDocument" Version="$(SystemXmlXDocumentVersion)" />
<PackageReference Include="System.Xml.XmlDocument" Version="$(SystemXmlXmlDocumentVersion)" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<Import Project="..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -35,6 +35,7 @@
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup>
......@@ -44,4 +45,4 @@
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -66,7 +66,8 @@
<PackageReference Include="System.Xml.XDocument" Version="$(SystemXmlXDocumentVersion)" />
<PackageReference Include="System.Xml.XmlDocument" Version="$(SystemXmlXmlDocumentVersion)" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<Import Project="..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -32,6 +32,7 @@
<PackageReference Include="Microsoft.DiaSymReader.Native" Version="$(MicrosoftDiaSymReaderNativeVersion)" />
<PackageReference Include="Microsoft.DiaSymReader" Version="$(MicrosoftDiaSymReaderVersion)" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup>
......@@ -76,4 +77,4 @@
<InternalsVisibleToTest Include="Roslyn.Services.UnitTests" />
</ItemGroup>
<Import Project="..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -104,8 +104,9 @@
<PackageReference Include="System.Xml.XDocument" Version="$(SystemXmlXDocumentVersion)" />
<PackageReference Include="System.Xml.XmlDocument" Version="$(SystemXmlXmlDocumentVersion)" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<Import Project="..\..\..\..\build\Targets\Imports.targets" />
<ProjectExtensions />
</Project>
\ No newline at end of file
</Project>
......@@ -32,7 +32,7 @@ private SyntaxTree GetTreeFromCode(string code)
return SyntaxFactory.ParseSyntaxTree(code);
}
public async Task GenerateBaseline()
private async Task GenerateBaseline()
{
Console.WriteLine(typeof(FactAttribute));
......
......@@ -7,7 +7,7 @@
namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.Interactive.Commands
{
internal class InteractiveCommandHandlerTests
public class InteractiveCommandHandlerTests
{
private const string Caret = "$$";
private const string ExampleCode1 = @"var x = 1;";
......
......@@ -400,7 +400,7 @@ private static RemoteHostService CreateService()
return new RemoteHostService(stream, new InProcRemoteHostClient.ServiceProvider(runCacheCleanup: false));
}
public static void SetEqual<T>(IEnumerable<T> expected, IEnumerable<T> actual)
private static void SetEqual<T>(IEnumerable<T> expected, IEnumerable<T> actual)
{
var expectedSet = new HashSet<T>(expected);
var result = expected.Count() == actual.Count() && expectedSet.SetEquals(actual);
......
......@@ -63,7 +63,8 @@
<PackageReference Include="EnvDTE80" Version="$(EnvDTE80Version)" />
<PackageReference Include="System.Collections.Immutable" Version="$(SystemCollectionsImmutableVersion)" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<Import Project="..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -5,6 +5,8 @@
using Xunit;
using ProjectUtils = Microsoft.VisualStudio.IntegrationTest.Utilities.Common.ProjectUtils;
#pragma warning disable xUnit1013 // currently there are public virtual methods that are overridden by derived types
namespace Roslyn.VisualStudio.IntegrationTests.Workspace
{
public abstract class WorkspaceBase : AbstractEditorTest
......
......@@ -37,6 +37,7 @@
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup>
......@@ -46,4 +47,4 @@
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -8,7 +8,7 @@ namespace Microsoft.CodeAnalysis.UnitTests.LinkedFileDiffMerging
{
public partial class LinkedFileDiffMergingTests
{
public void TestLinkedFileSet(string startText, List<string> updatedTexts, string expectedMergedText, string languageName)
private void TestLinkedFileSet(string startText, List<string> updatedTexts, string expectedMergedText, string languageName)
{
using (var workspace = new AdhocWorkspace())
{
......
......@@ -40,6 +40,7 @@
<Reference Include="System.Xml.Linq" />
<Reference Include="WindowsBase" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
<PackageReference Include="Microsoft.Tpl.Dataflow" Version="$(MicrosoftTplDataflowVersion)" />
<PackageReference Include="Microsoft.Build.Runtime" Version="$(MicrosoftBuildRuntimeVersion)" />
......@@ -56,4 +57,4 @@
</None>
</ItemGroup>
<Import Project="..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -1116,6 +1116,7 @@ public void TestLoadProjectFromCommandLine()
Assert.Equal(@"C:\ProjectDirectory\subdir\bar.cs", barDoc.FilePath);
}
[Fact, Trait(Traits.Feature, Traits.Features.Workspace)]
public void TestCommandLineProjectWithRelativePathOutsideProjectCone()
{
string commandLine = @"..\foo.cs";
......
......@@ -77,6 +77,7 @@ public void EditDistance4()
VerifyEditDistance("XlmReade", "XmlReader", 2);
}
[Fact]
public void EditDistance5()
{
VerifyEditDistance("Zeil", "trials", 4);
......
......@@ -177,7 +177,7 @@ public void TestTemporaryStorageMemoryMappedFileManagement()
// We want to keep this test around, but not have it disabled/associated with a bug
// [Fact, Trait(Traits.Feature, Traits.Features.Workspace)]
public void TestTemporaryStorageScaling()
private void TestTemporaryStorageScaling()
{
// This will churn through 4GB of memory. It validates that we don't
// use up our address space in a 32 bit process.
......
......@@ -417,7 +417,7 @@ public async Task TestUpdatedDocumentTextIsObservablyConstantAsync()
await CheckUpdatedDocumentTextIsObservablyConstantAsync(CreateWorkspaceWithRecoverableTrees());
}
public async Task CheckUpdatedDocumentTextIsObservablyConstantAsync(AdhocWorkspace ws)
private async Task CheckUpdatedDocumentTextIsObservablyConstantAsync(AdhocWorkspace ws)
{
var pid = ProjectId.CreateNewId();
var text = SourceText.From("public class C { }");
......
......@@ -54,6 +54,7 @@
<Reference Include="System.Xml.Linq" />
<Reference Include="WindowsBase" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup>
......@@ -311,4 +312,4 @@
<Compile Remove="TestFiles\*.cs" />
</ItemGroup>
<Import Project="..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -36,6 +36,7 @@
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup>
......@@ -64,4 +65,4 @@
</EmbeddedResource>
</ItemGroup>
<Import Project="..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册