Skip to content

Commit 21bac40

Browse files
committed
Update as per dotnet/arcade#8369
1 parent b922437 commit 21bac40

File tree

6 files changed

+18
-15
lines changed

6 files changed

+18
-15
lines changed

src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/Application.ParkingWindowTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public void ParkingWindow_DoesNotThrowOnGarbageCollecting()
3535
});
3636

3737
// verify the remote process succeeded
38-
Assert.Equal(0, invokerHandle.ExitCode);
38+
Assert.Equal(RemoteExecutor.SuccessExitCode, invokerHandle.ExitCode);
3939
}
4040

4141
private Form InitFormWithControlToGarbageCollect()

src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ListViewGroup.ListViewGroupAccessibleObjectTests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,9 @@ public void ListViewGroupAccessibleObject_Bounds_ReturnsCorrectValue()
285285
Rectangle expectedBounds = groupRect;
286286
Assert.Equal(expectedBounds, actualBounds);
287287
});
288+
289+
// verify the remote process succeeded
290+
Assert.Equal(RemoteExecutor.SuccessExitCode, invokerHandle.ExitCode);
288291
}
289292

290293
public static IEnumerable<object[]> ListViewGroupAccessibleObject_TestData()

src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ListViewGroupTests.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public unsafe void ListViewGroup_TitleImageIndex_GetGroupInfo_Success()
224224
});
225225

226226
// verify the remote process succeeded
227-
Assert.Equal(0, invokerHandle.ExitCode);
227+
Assert.Equal(RemoteExecutor.SuccessExitCode, invokerHandle.ExitCode);
228228
}
229229

230230
[WinFormsFact]
@@ -364,7 +364,7 @@ public unsafe void ListViewGroup_TitleImageKey_GetGroupInfo_Success()
364364
});
365365

366366
// verify the remote process succeeded
367-
Assert.Equal(0, invokerHandle.ExitCode);
367+
Assert.Equal(RemoteExecutor.SuccessExitCode, invokerHandle.ExitCode);
368368
}
369369

370370
[WinFormsTheory]
@@ -504,7 +504,7 @@ public unsafe void ListViewGroup_Subtitle_GetGroupInfo_Success()
504504
});
505505

506506
// verify the remote process succeeded
507-
Assert.Equal(0, invokerHandle.ExitCode);
507+
Assert.Equal(RemoteExecutor.SuccessExitCode, invokerHandle.ExitCode);
508508
}
509509

510510
[WinFormsTheory]
@@ -616,7 +616,7 @@ public unsafe void ListViewGroup_Footer_GetGroupInfo_Success()
616616
});
617617

618618
// verify the remote process succeeded
619-
Assert.Equal(0, invokerHandle.ExitCode);
619+
Assert.Equal(RemoteExecutor.SuccessExitCode, invokerHandle.ExitCode);
620620
}
621621

622622
public static IEnumerable<object[]> Alignment_Set_TestData()
@@ -876,7 +876,7 @@ public unsafe void ListViewGroup_Header_GetGroupInfo_Success()
876876
});
877877

878878
// verify the remote process succeeded
879-
Assert.Equal(0, invokerHandle.ExitCode);
879+
Assert.Equal(RemoteExecutor.SuccessExitCode, invokerHandle.ExitCode);
880880
}
881881

882882
[WinFormsTheory]
@@ -1142,7 +1142,7 @@ public unsafe void ListViewGroup_Collapse_GetGroupInfo_Success()
11421142
});
11431143

11441144
// verify the remote process succeeded
1145-
Assert.Equal(0, invokerHandle.ExitCode);
1145+
Assert.Equal(RemoteExecutor.SuccessExitCode, invokerHandle.ExitCode);
11461146
}
11471147

11481148
[WinFormsTheory]
@@ -1279,7 +1279,7 @@ public unsafe void ListViewGroup_Task_GetGroupInfo_Success()
12791279
});
12801280

12811281
// Verify the remote process succeeded.
1282-
Assert.Equal(0, invokerHandle.ExitCode);
1282+
Assert.Equal(RemoteExecutor.SuccessExitCode, invokerHandle.ExitCode);
12831283
}
12841284

12851285
[WinFormsTheory]

src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ListViewTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1969,7 +1969,7 @@ public unsafe void ListView_Handle_GetWithGroups_Success()
19691969
});
19701970

19711971
// verify the remote process succeeded
1972-
Assert.Equal(0, invokerHandle.ExitCode);
1972+
Assert.Equal(RemoteExecutor.SuccessExitCode, invokerHandle.ExitCode);
19731973
}
19741974

19751975
[WinFormsFact]
@@ -4575,7 +4575,7 @@ public unsafe void ListView_WmReflectNotify_LVN_KEYDOWN_WithGroups_and_SelectedI
45754575
}, keyString, expectedGroupIndexString);
45764576

45774577
// verify the remote process succeeded
4578-
Assert.Equal(0, invokerHandle.ExitCode);
4578+
Assert.Equal(RemoteExecutor.SuccessExitCode, invokerHandle.ExitCode);
45794579
}
45804580

45814581
[WinFormsTheory]

src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ProfessionalColorTableTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public void ProfessionalColorTable_ChangeUserPreferences_GetColor_ReturnsExpecte
199199
});
200200

201201
// verify the remote process succeeded
202-
Assert.Equal(0, invokerHandle.ExitCode);
202+
Assert.Equal(RemoteExecutor.SuccessExitCode, invokerHandle.ExitCode);
203203
}
204204
}
205205
}

src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/TaskDialogTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class TaskDialogTests : IClassFixture<ThreadExceptionFixture>
1313
public void TaskDialog_ShowDialog_SetProperty_SameThread_Success()
1414
{
1515
// Run this from another thread as we call Application.EnableVisualStyles.
16-
using RemoteInvokeHandle invokeHandle = RemoteExecutor.Invoke(() =>
16+
using RemoteInvokeHandle invokerHandle = RemoteExecutor.Invoke(() =>
1717
{
1818
Application.EnableVisualStyles();
1919
Control.CheckForIllegalCrossThreadCalls = true;
@@ -30,14 +30,14 @@ public void TaskDialog_ShowDialog_SetProperty_SameThread_Success()
3030
});
3131

3232
// verify the remote process succeeded
33-
Assert.Equal(0, invokeHandle.ExitCode);
33+
Assert.Equal(RemoteExecutor.SuccessExitCode, invokerHandle.ExitCode);
3434
}
3535

3636
[WinFormsFact]
3737
public void TaskDialog_ShowDialog_SetProperty_DifferentThread_ThrowsInvalidOperationException()
3838
{
3939
// Run this from another thread as we call Application.EnableVisualStyles.
40-
using RemoteInvokeHandle invokeHandle = RemoteExecutor.Invoke(() =>
40+
using RemoteInvokeHandle invokerHandle = RemoteExecutor.Invoke(() =>
4141
{
4242
Application.EnableVisualStyles();
4343
Control.CheckForIllegalCrossThreadCalls = true;
@@ -56,7 +56,7 @@ public void TaskDialog_ShowDialog_SetProperty_DifferentThread_ThrowsInvalidOpera
5656
});
5757

5858
// verify the remote process succeeded
59-
Assert.Equal(0, invokeHandle.ExitCode);
59+
Assert.Equal(RemoteExecutor.SuccessExitCode, invokerHandle.ExitCode);
6060
}
6161
}
6262
}

0 commit comments

Comments
 (0)