mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-09 23:45:42 +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.Runtime.CompilerServices;
|
||||
|
||||
@ -16,6 +17,7 @@ public static class DateTimeExtensions
|
||||
#else
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
|
||||
#endif
|
||||
[ExcludeFromCodeCoverage]
|
||||
public static int Age(this DateTime value)
|
||||
{
|
||||
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;
|
||||
|
||||
namespace X10D.Time;
|
||||
@ -19,6 +20,7 @@ public static class DateTimeOffsetExtensions
|
||||
#else
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
|
||||
#endif
|
||||
[ExcludeFromCodeCoverage]
|
||||
public static int Age(this DateTimeOffset value)
|
||||
{
|
||||
return value.Age(DateTime.Today);
|
||||
|
Loading…
Reference in New Issue
Block a user