}
},
{
+ "name": "System.Runtime.Tests",
+ "enabled": true,
+ "exclusions": {
+ "namespaces": null,
+ "classes": null,
+ "methods": [
+ {
+ "name": "System.Tests.TimeSpanTests.FromMilliseconds",
+ "reason": "The test will be enabled after https://github.com/dotnet/corefx/pull/37235"
+ },
+ {
+ "name": "System.Tests.TimeSpanTests.FromMilliseconds_Invalid",
+ "reason": "The test will be enabled after https://github.com/dotnet/corefx/pull/37235"
+ },
+ {
+ "name": "System.Tests.TimeSpanTests.NamedMultiplication",
+ "reason": "The test will be enabled after https://github.com/dotnet/corefx/pull/37235"
+ },
+ {
+ "name": "System.Tests.TimeSpanTests.Multiplication",
+ "reason": "The test will be enabled after https://github.com/dotnet/corefx/pull/37235"
+ },
+ {
+ "name": "System.Tests.TimeSpanTests.Division",
+ "reason": "The test will be enabled after https://github.com/dotnet/corefx/pull/37235"
+ },
+ {
+ "name": "System.Tests.TimeSpanTests.NamedDivision",
+ "reason": "The test will be enabled after https://github.com/dotnet/corefx/pull/37235"
+ },
+ {
+ "name": "System.Text.Tests.StringBuilderTests.Equals",
+ "reason": "Because of a change in StringBuilder, this test is outdated."
+ },
+ {
+ "name": "System.Tests.DecimalTests.Remainder",
+ "reason": "https://github.com/dotnet/coreclr/issues/12605"
+ },
+ {
+ "name": "System.Tests.DecimalTests.Remainder_Invalid",
+ "reason": "https://github.com/dotnet/coreclr/issues/12605"
+ },
+ {
+ "name": "System.Tests.DecimalTests+BigIntegerMod.Test",
+ "reason": "https://github.com/dotnet/coreclr/issues/12605"
+ },
+ {
+ "name": "System.Tests.DecimalTests.Round_InvalidMidpointRounding_ThrowsArgumentException",
+ "reason": "outdated"
+ },
+ {
+ "name": "System.Tests.ArrayTests.Copy",
+ "reason": "Needs updates for XUnit 2.4"
+ },
+ {
+ "name": "System.Tests.ArraySegment_Tests.CopyTo_Invalid",
+ "reason": "Needs parameter name updated to 'destination'."
+ },
+ {
+ "name": "System.Tests.TimeSpanTests.Parse_Invalid",
+ "reason": "Temporary disabling till merging the PR https://github.com/dotnet/corefx/pull/34561"
+ },
+ {
+ "name": "System.Tests.TimeSpanTests.Parse_Span",
+ "reason": "Temporary disabling till merging the PR https://github.com/dotnet/corefx/pull/34561"
+ },
+ {
+ "name": "System.Tests.TimeSpanTests.Parse_Span_Invalid",
+ "reason": "Temporary disabling till merging the PR https://github.com/dotnet/corefx/pull/34561"
+ },
+ {
+ "name": "System.Tests.TimeSpanTests.Parse",
+ "reason": "Temporary disabling till merging the PR https://github.com/dotnet/corefx/pull/34561"
+ },
+ {
+ "name": "System.Tests.SingleTests.Test_ToString",
+ "reason" : "https://github.com/dotnet/coreclr/pull/22040"
+ },
+ {
+ "name": "System.Tests.SingleTests.TryFormat",
+ "reason" : "https://github.com/dotnet/coreclr/pull/22040"
+ },
+ {
+ "name": "System.Tests.DoubleTests.Test_ToString",
+ "reason" : "https://github.com/dotnet/coreclr/pull/22040"
+ },
+ {
+ "name": "System.Tests.DoubleTests.TryFormat",
+ "reason" : "https://github.com/dotnet/coreclr/pull/22040"
+ },
+ {
+ "name": "System.Tests.TimeSpanTests.Total_Days_Hours_Minutes_Seconds_Milliseconds",
+ "reason" : "https://github.com/dotnet/coreclr/pull/22040"
+ },
+ {
+ "name": "System.Tests.BufferTests.BlockCopy_Invalid",
+ "reason": "https://github.com/dotnet/coreclr/pull/23636"
+ },
+ {
+ "name": "System.Tests.VersionTests.Comparisons_NullArgument_ThrowsArgumentNullException",
+ "reason": "Version was improved to no longer throw from comparison operators"
+ },
+ {
+ "name" : "System.Tests.ActivatorNetcoreTests.CreateInstanceAssemblyResolve",
+ "reason" : "Waiting for https://github.com/dotnet/corefx/pull/37080"
+ }
+ ]
+ }
+ },
+ {
"name": "System.Runtime.Extensions.Tests",
"enabled": true,
"exclusions": {
}
},
{
- "name": "System.Runtime.Tests",
- "enabled": true,
- "exclusions": {
- "namespaces": null,
- "classes": null,
- "methods": [
- {
- "name": "System.Text.Tests.StringBuilderTests.Equals",
- "reason": "Because of a change in StringBuilder, this test is outdated."
- },
- {
- "name": "System.Tests.DecimalTests.Remainder",
- "reason": "https://github.com/dotnet/coreclr/issues/12605"
- },
- {
- "name": "System.Tests.DecimalTests.Remainder_Invalid",
- "reason": "https://github.com/dotnet/coreclr/issues/12605"
- },
- {
- "name": "System.Tests.DecimalTests+BigIntegerMod.Test",
- "reason": "https://github.com/dotnet/coreclr/issues/12605"
- },
- {
- "name": "System.Tests.DecimalTests.Round_InvalidMidpointRounding_ThrowsArgumentException",
- "reason": "outdated"
- },
- {
- "name": "System.Tests.ArrayTests.Copy",
- "reason": "Needs updates for XUnit 2.4"
- },
- {
- "name": "System.Tests.ArraySegment_Tests.CopyTo_Invalid",
- "reason": "Needs parameter name updated to 'destination'."
- },
- {
- "name": "System.Tests.TimeSpanTests.Parse_Invalid",
- "reason": "Temporary disabling till merging the PR https://github.com/dotnet/corefx/pull/34561"
- },
- {
- "name": "System.Tests.TimeSpanTests.Parse_Span",
- "reason": "Temporary disabling till merging the PR https://github.com/dotnet/corefx/pull/34561"
- },
- {
- "name": "System.Tests.TimeSpanTests.Parse_Span_Invalid",
- "reason": "Temporary disabling till merging the PR https://github.com/dotnet/corefx/pull/34561"
- },
- {
- "name": "System.Tests.TimeSpanTests.Parse",
- "reason": "Temporary disabling till merging the PR https://github.com/dotnet/corefx/pull/34561"
- },
- {
- "name": "System.Tests.SingleTests.Test_ToString",
- "reason" : "https://github.com/dotnet/coreclr/pull/22040"
- },
- {
- "name": "System.Tests.SingleTests.TryFormat",
- "reason" : "https://github.com/dotnet/coreclr/pull/22040"
- },
- {
- "name": "System.Tests.DoubleTests.Test_ToString",
- "reason" : "https://github.com/dotnet/coreclr/pull/22040"
- },
- {
- "name": "System.Tests.DoubleTests.TryFormat",
- "reason" : "https://github.com/dotnet/coreclr/pull/22040"
- },
- {
- "name": "System.Tests.TimeSpanTests.Total_Days_Hours_Minutes_Seconds_Milliseconds",
- "reason" : "https://github.com/dotnet/coreclr/pull/22040"
- },
- {
- "name": "System.Tests.BufferTests.BlockCopy_Invalid",
- "reason": "https://github.com/dotnet/coreclr/pull/23636"
- },
- {
- "name": "System.Tests.VersionTests.Comparisons_NullArgument_ThrowsArgumentNullException",
- "reason": "Version was improved to no longer throw from comparison operators"
- },
- {
- "name" : "System.Tests.ActivatorNetcoreTests.CreateInstanceAssemblyResolve",
- "reason" : "Waiting for https://github.com/dotnet/corefx/pull/37080"
- }
- ]
- }
- },
- {
"name": "System.Xml.Linq.SDMSample.Tests",
"enabled": true,
"exclusions": {
public static TimeSpan FromDays(double value)
{
- return Interval(value, MillisPerDay);
+ return Interval(value, TicksPerDay);
}
public TimeSpan Duration()
public static TimeSpan FromHours(double value)
{
- return Interval(value, MillisPerHour);
+ return Interval(value, TicksPerHour);
}
- private static TimeSpan Interval(double value, int scale)
+ private static TimeSpan Interval(double value, double scale)
{
if (double.IsNaN(value))
throw new ArgumentException(SR.Arg_CannotBeNaN);
- double tmp = value * scale;
- double millis = tmp + (value >= 0 ? 0.5 : -0.5);
- if ((millis > long.MaxValue / TicksPerMillisecond) || (millis < long.MinValue / TicksPerMillisecond))
+ double millis = value * scale;
+ if ((millis > long.MaxValue) || (millis < long.MinValue))
throw new OverflowException(SR.Overflow_TimeSpanTooLong);
- return new TimeSpan((long)millis * TicksPerMillisecond);
+ return new TimeSpan((long)millis);
}
public static TimeSpan FromMilliseconds(double value)
{
- return Interval(value, 1);
+ return Interval(value, TicksPerMillisecond);
}
public static TimeSpan FromMinutes(double value)
{
- return Interval(value, MillisPerMinute);
+ return Interval(value, TicksPerMinute);
}
public TimeSpan Negate()
public static TimeSpan FromSeconds(double value)
{
- return Interval(value, MillisPerSecond);
+ return Interval(value, TicksPerSecond);
}
public TimeSpan Subtract(TimeSpan ts)