Skip to content

Commit d46e10f

Browse files
committed
fix further
1 parent f4d3785 commit d46e10f

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

dotnet/test/common/BiDi/Script/CallFunctionRemoteValueTest.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,8 @@ public async Task CanCallFunctionAndReturnNumberNegativeZero()
118118
Assert.That(response.Result, Is.AssignableTo<RemoteValue.Number>());
119119

120120
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-
}
121+
Assert.That(actualNumberValue, Is.EqualTo(0));
122+
Assert.That(double.IsNegative(actualNumberValue), Is.True);
129123
}
130124

131125
[Test]

0 commit comments

Comments
 (0)