Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit c98a153

Browse files
committed
Update System.Diagnostic.Debug whitebox test to match CoreCLR changes
1 parent 3ad966f commit c98a153

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/System.Diagnostics.Debug/tests/DebugTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,13 @@ static void VerifyAssert(Action test, params string[] expectedOutputStrings)
201201
}
202202

203203
FieldInfo writeCoreHook = typeof(Debug).GetField("s_WriteCore", BindingFlags.Static | BindingFlags.NonPublic);
204-
FieldInfo showAssertDialogHook = typeof(Debug).GetField("s_ShowAssertDialog", BindingFlags.Static | BindingFlags.NonPublic);
204+
FieldInfo showDialogHook = typeof(Debug).GetField("s_ShowDialog", BindingFlags.Static | BindingFlags.NonPublic);
205205

206206
var originalWriteCoreHook = writeCoreHook.GetValue(null);
207207
writeCoreHook.SetValue(null, new Action<string>(WriteLogger.s_instance.WriteCore));
208208

209-
var originalShowAssertDialogHook = showAssertDialogHook.GetValue(null);
210-
showAssertDialogHook.SetValue(null, new Action<string, string, string>(WriteLogger.s_instance.ShowAssertDialog));
209+
var originalShowDialogHook = showDialogHook.GetValue(null);
210+
showDialogHook.SetValue(null, new Action<string, string, string, string>(WriteLogger.s_instance.ShowDialog));
211211

212212
try
213213
{
@@ -228,7 +228,7 @@ static void VerifyAssert(Action test, params string[] expectedOutputStrings)
228228
finally
229229
{
230230
writeCoreHook.SetValue(null, originalWriteCoreHook);
231-
showAssertDialogHook.SetValue(null, originalShowAssertDialogHook);
231+
showDialogHook.SetValue(null, originalShowDialogHook);
232232
}
233233
}
234234

@@ -248,9 +248,9 @@ public void Clear()
248248
AssertUIOutput = string.Empty;
249249
}
250250

251-
public void ShowAssertDialog(string stackTrace, string message, string detailMessage)
251+
public void ShowDialog(string stackTrace, string message, string detailMessage, string errorSource)
252252
{
253-
AssertUIOutput += stackTrace + message + detailMessage;
253+
AssertUIOutput += stackTrace + message + detailMessage + errorSource;
254254
}
255255

256256
public void WriteCore(string message)

0 commit comments

Comments
 (0)