We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4d3785 commit d46e10fCopy full SHA for d46e10f
dotnet/test/common/BiDi/Script/CallFunctionRemoteValueTest.cs
@@ -118,14 +118,8 @@ public async Task CanCallFunctionAndReturnNumberNegativeZero()
118
Assert.That(response.Result, Is.AssignableTo<RemoteValue.Number>());
119
120
var actualNumberValue = ((RemoteValue.Number)response.Result).Value;
121
- Assert.That(IsNegativeZero(actualNumberValue));
122
-
123
- static bool IsNegativeZero(double d)
124
- {
125
- // '== double.NegativeZero' does not work, -0 == 0 is considered true
126
- // Need special verification to tell if a double is -0
127
- return double.IsNegative(d) && d == 0;
128
- }
+ Assert.That(actualNumberValue, Is.EqualTo(0));
+ Assert.That(double.IsNegative(actualNumberValue), Is.True);
129
}
130
131
[Test]
0 commit comments