Skip to content

Commit

Permalink
remove incorrect notnull for objects (#1275)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp authored Sep 2, 2024
1 parent e43ffe1 commit 055d9b2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 25 deletions.
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project>
<PropertyGroup>
<NoWarn>CS1591;CS0649;xUnit1026;xUnit1013;CS1573;VerifyTestsProjectDir;VerifySetParameters;PolyFillTargetsForNuget</NoWarn>
<Version>26.3.0</Version>
<Version>26.3.1</Version>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>preview</LangVersion>
<AssemblyVersion>1.0.0</AssemblyVersion>
Expand Down
12 changes: 4 additions & 8 deletions src/Verify.NUnit/VerifyBase_Object.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,25 @@ public partial class VerifyBase
[Pure]
public SettingsTask Verify<T>(
Func<Task<T>> target,
VerifySettings? settings = null)
where T : notnull =>
VerifySettings? settings = null) =>
Verifier.Verify(target(), settings ?? this.settings, sourceFile);

[Pure]
public SettingsTask Verify<T>(
Task<T> target,
VerifySettings? settings = null)
where T : notnull =>
VerifySettings? settings = null) =>
Verifier.Verify(target, settings ?? this.settings, sourceFile);

[Pure]
public SettingsTask Verify<T>(
ValueTask<T> target,
VerifySettings? settings = null)
where T : notnull =>
VerifySettings? settings = null) =>
Verifier.Verify(target, settings ?? this.settings, sourceFile);

[Pure]
public SettingsTask Verify<T>(
IAsyncEnumerable<T> target,
VerifySettings? settings = null)
where T : notnull =>
VerifySettings? settings = null) =>
Verifier.Verify(target, settings ?? this.settings, sourceFile);

[Pure]
Expand Down
12 changes: 4 additions & 8 deletions src/Verify.Xunit/VerifyBase_Object.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,25 @@ public partial class VerifyBase
[Pure]
public SettingsTask Verify<T>(
Func<Task<T>> target,
VerifySettings? settings = null)
where T : notnull =>
VerifySettings? settings = null) =>
Verifier.Verify(target(), settings ?? this.settings, sourceFile);

[Pure]
public SettingsTask Verify<T>(
Task<T> target,
VerifySettings? settings = null)
where T : notnull =>
VerifySettings? settings = null) =>
Verifier.Verify(target, settings ?? this.settings, sourceFile);

[Pure]
public SettingsTask Verify<T>(
ValueTask<T> target,
VerifySettings? settings = null)
where T : notnull =>
VerifySettings? settings = null) =>
Verifier.Verify(target, settings ?? this.settings, sourceFile);

[Pure]
public SettingsTask Verify<T>(
IAsyncEnumerable<T> target,
VerifySettings? settings = null)
where T : notnull =>
VerifySettings? settings = null) =>
Verifier.Verify(target, settings ?? this.settings, sourceFile);

[Pure]
Expand Down
12 changes: 4 additions & 8 deletions src/Verify.XunitV3/VerifyBase_Object.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,25 @@ public partial class VerifyBase
[Pure]
public SettingsTask Verify<T>(
Func<Task<T>> target,
VerifySettings? settings = null)
where T : notnull =>
VerifySettings? settings = null) =>
Verifier.Verify(target(), settings ?? this.settings, sourceFile);

[Pure]
public SettingsTask Verify<T>(
Task<T> target,
VerifySettings? settings = null)
where T : notnull =>
VerifySettings? settings = null) =>
Verifier.Verify(target, settings ?? this.settings, sourceFile);

[Pure]
public SettingsTask Verify<T>(
ValueTask<T> target,
VerifySettings? settings = null)
where T : notnull =>
VerifySettings? settings = null) =>
Verifier.Verify(target, settings ?? this.settings, sourceFile);

[Pure]
public SettingsTask Verify<T>(
IAsyncEnumerable<T> target,
VerifySettings? settings = null)
where T : notnull =>
VerifySettings? settings = null) =>
Verifier.Verify(target, settings ?? this.settings, sourceFile);

[Pure]
Expand Down

0 comments on commit 055d9b2

Please sign in to comment.