Skip to content

Commit 8c36bb2

Browse files
committed
PR feedback
1 parent f2a615e commit 8c36bb2

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ await context.Script.CallFunctionAsync($$"""
127127
}
128128

129129
[Test]
130-
public void CanCallFunctionWithArgumentNumber5()
130+
public void CanCallFunctionWithArgumentNumberFive()
131131
{
132132
var number5 = new LocalValue.Number(5);
133133

@@ -144,7 +144,7 @@ await context.Script.CallFunctionAsync($$"""
144144
}
145145

146146
[Test]
147-
public void CanCallFunctionWithArgumentNumberNegative5()
147+
public void CanCallFunctionWithArgumentNumberNegativeFive()
148148
{
149149
var numberMinus5 = new LocalValue.Number(-5);
150150

@@ -161,7 +161,7 @@ await context.Script.CallFunctionAsync($$"""
161161
}
162162

163163
[Test]
164-
public void CanCallFunctionWithArgumentNumber0()
164+
public void CanCallFunctionWithArgumentNumberZero()
165165
{
166166
var number0 = new LocalValue.Number(0);
167167

@@ -180,15 +180,15 @@ await context.Script.CallFunctionAsync($$"""
180180
[Test]
181181
[IgnoreBrowser(Selenium.Browser.Edge, "Chromium can't handle -0 argument as a number: https://github.com/w3c/webdriver-bidi/issues/887")]
182182
[IgnoreBrowser(Selenium.Browser.Chrome, "Chromium can't handle -0 argument as a number: https://github.com/w3c/webdriver-bidi/issues/887")]
183-
public void CanCallFunctionWithArgumentNumberNegative0()
183+
public void CanCallFunctionWithArgumentNumberNegativeZero()
184184
{
185185
var minus0 = new LocalValue.Number(double.NegativeZero);
186186

187187
Assert.That(async () =>
188188
{
189189
await context.Script.CallFunctionAsync($$"""
190190
(arg) => {
191-
if (arg !== 0 || arg.toLocaleString()[0] !== '-') {
191+
if (!Object.is(arg, -0)) {
192192
throw new Error("Assert failed: " + arg.toLocaleString());
193193
}
194194
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public async Task CanCallFunctionAndReturnUnixEpoch()
8484
}
8585

8686
[Test]
87-
public async Task CanCallFunctionAndReturnNumber5()
87+
public async Task CanCallFunctionAndReturnNumberFive()
8888
{
8989
var response = await context.Script.CallFunctionAsync("() => { return 5; }", false);
9090

@@ -93,7 +93,7 @@ public async Task CanCallFunctionAndReturnNumber5()
9393
}
9494

9595
[Test]
96-
public async Task CanCallFunctionAndReturnNumberNegative5()
96+
public async Task CanCallFunctionAndReturnNumberNegativeFive()
9797
{
9898
var response = await context.Script.CallFunctionAsync("() => { return -5; }", false);
9999

@@ -102,7 +102,7 @@ public async Task CanCallFunctionAndReturnNumberNegative5()
102102
}
103103

104104
[Test]
105-
public async Task CanCallFunctionAndReturnNumber0()
105+
public async Task CanCallFunctionAndReturnNumberZero()
106106
{
107107
var response = await context.Script.CallFunctionAsync("() => { return 0; }", false);
108108

@@ -111,7 +111,7 @@ public async Task CanCallFunctionAndReturnNumber0()
111111
}
112112

113113
[Test]
114-
public async Task CanCallFunctionAndReturnNumberNegative0()
114+
public async Task CanCallFunctionAndReturnNumberNegativeZero()
115115
{
116116
var response = await context.Script.CallFunctionAsync("() => { return -0; }", false);
117117

0 commit comments

Comments
 (0)