mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-09 23:25:43 +00:00
test: exclude uncoverable Age overload from coverage
This commit is contained in:
parent
15d0f93f8b
commit
b68c804b46
@ -1,4 +1,5 @@
|
|||||||
using System.Diagnostics.Contracts;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
using System.Diagnostics.Contracts;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
@ -16,6 +17,7 @@ public static class DateTimeExtensions
|
|||||||
#else
|
#else
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
|
||||||
#endif
|
#endif
|
||||||
|
[ExcludeFromCodeCoverage]
|
||||||
public static int Age(this DateTime value)
|
public static int Age(this DateTime value)
|
||||||
{
|
{
|
||||||
return value.Age(DateTime.Today);
|
return value.Age(DateTime.Today);
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System.Diagnostics.Contracts;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
using System.Diagnostics.Contracts;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
namespace X10D.Time;
|
namespace X10D.Time;
|
||||||
@ -19,6 +20,7 @@ public static class DateTimeOffsetExtensions
|
|||||||
#else
|
#else
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
|
||||||
#endif
|
#endif
|
||||||
|
[ExcludeFromCodeCoverage]
|
||||||
public static int Age(this DateTimeOffset value)
|
public static int Age(this DateTimeOffset value)
|
||||||
{
|
{
|
||||||
return value.Age(DateTime.Today);
|
return value.Age(DateTime.Today);
|
||||||
|
Loading…
Reference in New Issue
Block a user