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

Add the Globalization Invariant mode tests#17798

Merged
tarekgh merged 4 commits intodotnet:masterfrom
tarekgh:AddGlobalizationInvariantTest
Apr 3, 2017
Merged

Add the Globalization Invariant mode tests#17798
tarekgh merged 4 commits intodotnet:masterfrom
tarekgh:AddGlobalizationInvariantTest

Conversation

@tarekgh
Copy link
Member

@tarekgh tarekgh commented Apr 2, 2017

No description provided.

@tarekgh
Copy link
Member Author

tarekgh commented Apr 2, 2017

CC @stephentoub @danmosemsft @weshaggard @krwq

@tarekgh tarekgh self-assigned this Apr 2, 2017

[Theory]
[MemberData(nameof(IsPrefix_TestData))]

Copy link
Member

Choose a reason for hiding this comment

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

nit , some of your methods have newline between attribute and method

Assert.Equal(result, lower.ToUpper().Equals(upper, StringComparison.Ordinal));
}
}

Copy link
Member

Choose a reason for hiding this comment

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

nit extra line

<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Release|AnyCPU'" />
<PropertyGroup>
<!-- we are overriding the .json config file -->
Copy link
Member

Choose a reason for hiding this comment

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

Nit: it'd be good to include a "why" for this


public void TestIndexOf(string source, string value, int startIndex, int count, CompareOptions options, int result)
{
foreach (var cul in s_cultureNames)
Copy link
Member

Choose a reason for hiding this comment

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

Nit: var => string in this and other such cases

}

private static string[] s_cultureNames = new string[] { "en-US", "ja-JP", "fr-FR", "tr-TR", "" };

Copy link
Member

Choose a reason for hiding this comment

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

Nit: readonly

private static string[] s_cultureNames = new string[] { "en-US", "ja-JP", "fr-FR", "tr-TR", "" };

public static IEnumerable<object[]> IndexOf_TestData()
{
Copy link
Member

Choose a reason for hiding this comment

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

Don't we already have member data inputs for a bunch of these? Can we refactor them out of their current location and put them in a shared file that both projects can then just include?

Copy link
Member Author

Choose a reason for hiding this comment

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

There is many differences compared to the data exist in other tests. this is the whole point for test invariant mode to ensure such differences.

@tarekgh tarekgh merged commit 46efaaa into dotnet:master Apr 3, 2017
@karelz karelz modified the milestone: 2.0.0 Apr 4, 2017
@tarekgh tarekgh deleted the AddGlobalizationInvariantTest branch April 18, 2017 17:50
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