Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Fix System.Runtime.Numerics Tests to run against desktop #15050

Merged
merged 1 commit into from
Jan 11, 2017

Conversation

tarekgh
Copy link
Member

@tarekgh tarekgh commented Jan 10, 2017

Fixes #14993
Fixes #14992
Fixes #14991

@tarekgh
Copy link
Member Author

tarekgh commented Jan 10, 2017

@mellinoe could you please have a look?

cc @danmosemsft

Copy link
Contributor

@mellinoe mellinoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the changes look good; we should disable the tests that are netcoreapp-specific (the ones that are using internal state). Some of the tests look pretty normal, though. I think we need to take a closer look to figure out why they are behaving differently. Are we able to mark those tests with ActiveIssue for .NET Framework instead?

{
IComparable comparable = new BigInteger();
Assert.Equal(1, comparable.CompareTo(null));
Assert.Throws<ArgumentException>("obj", () => comparable.CompareTo(0)); // Obj is not a BigInteger
Assert.Throws<ArgumentException>(paramName, () => comparable.CompareTo(0)); // Obj is not a BigInteger
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want/need these exception messages to be the same?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't have to be. it depends on the behavior we desire. if netcore behavior is correct or better one then we can have differences. if it doesn't matter to have this netcore behavior then we can change it to match the desktop. from what I am seeing it make sense to keep netcore behavior

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option is just to remove the name verification in this case. What you have is fine, though.

@@ -13,6 +13,7 @@ public class IsEvenTest
private static int s_seed = 0;

[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we actually need to figure out why the behavior is different here. This one doesn't seem to be doing anything with internal state.

@@ -292,6 +292,7 @@ public static IEnumerable<object[]> ACos_Advanced_TestData()
}

[Theory, MemberData("ACos_Advanced_TestData")]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think all of the tests in this class should be checked as well; they don't seem to be testing anything platform-specific.

@tarekgh
Copy link
Member Author

tarekgh commented Jan 11, 2017

Most of the changes look good; we should disable the tests that are netcoreapp-specific (the ones that are using internal state). Some of the tests look pretty normal, though. I think we need to take a closer look to figure out why they are behaving differently. Are we able to mark those tests with ActiveIssue for .NET Framework instead?

I am just trying to enable the test to run on the desktop. I have opened the issue #15051 to track the needed investigations so we don't have to block this PR and get the test runs on desktop. please let me know if you are ok with this.

@mellinoe
Copy link
Contributor

I'm okay with that. It sounds like we can't use ActiveIssue for a particular TFM, so this is fine for now.

@tarekgh
Copy link
Member Author

tarekgh commented Jan 11, 2017

test Innerloop Ubuntu14.04 Debug Build and Test please

@tarekgh
Copy link
Member Author

tarekgh commented Jan 11, 2017

test Innerloop OSX Debug Build and Test please

@mellinoe mellinoe merged commit b434d42 into dotnet:master Jan 11, 2017
@karelz karelz modified the milestone: 2.0.0 Jan 12, 2017
@tarekgh tarekgh deleted the FixNumericTests branch April 18, 2017 17:50
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Fix System.Runtime.Numerics Tests to run against desktop

Commit migrated from dotnet/corefx@b434d42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants