Skip to content

Commit

Permalink
Revert "49936 text json failures" (dotnet#69243)
Browse files Browse the repository at this point in the history
* Revert "49936 text json failures (dotnet#68758)"
This reverts commit 43dd0a7.
  • Loading branch information
mkhamoyan authored May 12, 2022
1 parent 7723254 commit cbd402b
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,10 @@ private static void RunAsRootTypeTest<T>(List<T> numbers)

private static string GetNumberAsString<T>(T number)
{
// Took out float case from switch due to nan conversion
// There is active issue https://github.com/dotnet/runtime/issues/68906 on x86 Android
if (number is float)
{
return ((float)(object)number).ToString(JsonTestHelper.SingleFormatString, CultureInfo.InvariantCulture);
}

return number switch
{
double @double => @double.ToString(JsonTestHelper.DoubleFormatString, CultureInfo.InvariantCulture),
float @float => @float.ToString(JsonTestHelper.SingleFormatString, CultureInfo.InvariantCulture),
decimal @decimal => @decimal.ToString(CultureInfo.InvariantCulture),
_ => number.ToString()
};
Expand Down Expand Up @@ -365,6 +359,7 @@ public class Class_With_ListsOfBoxedNonNumbers
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/49936", TestPlatforms.Android)]
public static void Number_AsCollectionElement_RoundTrip()
{
RunAsCollectionElementTest(JsonNumberTestData.Bytes);
Expand Down Expand Up @@ -991,6 +986,7 @@ private static void AssertUnsupportedFormatThrows<T>()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/49936", TestPlatforms.Android)]
public static void EscapingTest()
{
// Cause all characters to be escaped.
Expand Down

0 comments on commit cbd402b

Please sign in to comment.