File tree 6 files changed +7
-37
lines changed
test/Xunit.SkippableFact.Tests
6 files changed +7
-37
lines changed Original file line number Diff line number Diff line change 29
29
<PackageReference Include =" Nerdbank.GitVersioning" Version =" 3.1.74" PrivateAssets =" all" />
30
30
<PackageReference Include =" Microsoft.Net.Compilers.Toolset" Version =" 3.5.0" PrivateAssets =" all" />
31
31
<PackageReference Include =" StyleCop.Analyzers" Version =" 1.2.0-beta.164" PrivateAssets =" all" />
32
+ <PackageReference Include =" Nullable" Version =" 1.2.1" PrivateAssets =" all" />
32
33
</ItemGroup >
33
34
<ItemGroup >
34
35
<AdditionalFiles Include =" $(MSBuildThisFileDirectory)stylecop.json" />
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -17,8 +17,7 @@ public static class Skip
17
17
/// <param name="condition">The condition that must evaluate to <c>true</c> for the test to be skipped.</param>
18
18
/// <param name="reason">The explanation for why the test is skipped.</param>
19
19
public static void If (
20
- [ DoesNotReturnIf ( true ) ]
21
- bool condition ,
20
+ [ DoesNotReturnIf ( true ) ] bool condition ,
22
21
string ? reason = null )
23
22
{
24
23
if ( condition )
@@ -33,8 +32,7 @@ public static void If(
33
32
/// <param name="condition">The condition that must evaluate to <c>false</c> for the test to be skipped.</param>
34
33
/// <param name="reason">The explanation for why the test is skipped.</param>
35
34
public static void IfNot (
36
- [ DoesNotReturnIf ( false ) ]
37
- bool condition ,
35
+ [ DoesNotReturnIf ( false ) ] bool condition ,
38
36
string ? reason = null )
39
37
{
40
38
Skip . If ( ! condition , reason ) ;
Original file line number Diff line number Diff line change 1
1
<Project Sdk =" Microsoft.NET.Sdk" >
2
2
<PropertyGroup >
3
- <TargetFrameworks >netstandard2.0;netstandard2.1; net45;net452</TargetFrameworks >
3
+ <TargetFrameworks >netstandard2.0;net45;net452</TargetFrameworks >
4
4
<RootNamespace >Xunit</RootNamespace >
5
5
6
6
<Title >Dynamic test skipping for Xunit</Title >
11
11
<None Update =" xunit.runner.json" >
12
12
<CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
13
13
</None >
14
- </ItemGroup >
14
+ </ItemGroup >
15
15
<ItemGroup >
16
16
<PackageReference Include =" Validation" Version =" 2.4.18" PrivateAssets =" compile;contentfiles;analyzers;build" />
17
17
<PackageReference Include =" xunit.extensibility.execution" Version =" 2.1.0" Condition =" '$(TargetFramework)' == 'net45' " />
Original file line number Diff line number Diff line change @@ -49,7 +49,6 @@ public void IfNot_WithReason()
49
49
}
50
50
}
51
51
52
- #if NETCOREAPP3_1
53
52
[ Fact ]
54
53
public void If_SupportsNullableReferenceTypesPostCondition ( )
55
54
{
@@ -76,11 +75,10 @@ public void IfNot_SupportsNullableReferenceTypesPostCondition()
76
75
? "Not null"
77
76
: null ;
78
77
79
- Skip . IfNot ( ! ( value is null ) ) ;
78
+ Skip . IfNot ( value is object ) ;
80
79
81
80
// Does not trigger a nullable reference type warning
82
81
_ = value . Substring ( 0 ) ;
83
82
}
84
- #endif
85
83
}
86
84
}
Original file line number Diff line number Diff line change 1
1
<Project Sdk =" Microsoft.NET.Sdk" >
2
2
<PropertyGroup >
3
- <TargetFrameworks >net45;net461;netcoreapp2.1;netcoreapp3.1 </TargetFrameworks >
3
+ <TargetFrameworks >net45;net461;netcoreapp2.1</TargetFrameworks >
4
4
<IsPackable >false</IsPackable >
5
5
</PropertyGroup >
6
6
<ItemGroup >
You can’t perform that action at this time.
0 commit comments