Skip to content

Commit

Permalink
[MouseWithoutBorders] - fixing unit test - microsoft#35155
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeclayton committed Oct 20, 2024
1 parent 3d3bbef commit d6cdf87
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 63 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,66 +207,6 @@ PackageReceived = MouseWithoutBorders.PackageMonitor
--ExplorerDragDrop = 0
--Nil = 0
PackageID = 0
QUEUE_SIZE = 50
RecentProcessedPackageIDs = 32[]
--[0] = 0
--[1] = 0
--[2] = 0
--[3] = 0
--[4] = 0
--[5] = 0
--[6] = 0
--[7] = 0
--[8] = 0
--[9] = 0
--[10] = 0
--[11] = 0
--[12] = 0
--[13] = 0
--[14] = 0
--[15] = 0
--[16] = 0
--[17] = 0
--[18] = 0
--[19] = 0
--[20] = 0
--[21] = 0
--[22] = 0
--[23] = 0
--[24] = 0
--[25] = 0
--[26] = 0
--[27] = 0
--[28] = 0
--[29] = 0
--[30] = 0
--[31] = 0
--[32] = 0
--[33] = 0
--[34] = 0
--[35] = 0
--[36] = 0
--[37] = 0
--[38] = 0
--[39] = 0
--[40] = 0
--[41] = 0
--[42] = 0
--[43] = 0
--[44] = 0
--[45] = 0
--[46] = 0
--[47] = 0
--[48] = 0
--[49] = 0
recentProcessedPackageIndex = 0
processedPackageCount = 0
skippedPackageCount = 0
<JustGotAKey>k__BackingField = 0
lastXY = {X=0,Y=0}
--x = 0
--y = 0
--Empty = {X=0,Y=0}
shownErrMessage = False
lastStartServiceTime = ????????????
--_dateData = ????????????
Expand Down Expand Up @@ -334,7 +274,7 @@ WM_KEYDOWN = 256
WM_KEYUP = 257
WM_SYSKEYDOWN = 260
WM_SYSKEYUP = 261
[Logger Logs]
[Logger]
===============
AllLogsLock = O
LogCounter = Concurrent.ConcurrentDictionary`2[System.String,32]
Expand Down Expand Up @@ -402,3 +342,65 @@ MAX_LOG = 10000
MaxLogExceptionPerHour = 1000
HeaderSENT = Be{0},Ke{1},Mo{2},He{3},Mx{4},Tx{5},Im{6},By{7},Cl{8},Dr{9},De{10},Ed{11},Ie{12},Ni{13}
HeaderRECEIVED = Be{0},Ke{1},Mo{2},He{3},Mx{4},Tx{5},Im{6},By{7},Cl{8},Dr{9},De{10},Ed{11},In{12},Ni{13},Pc{14}/{15}
[Receiver]
===============
QUEUE_SIZE = 50
RecentProcessedPackageIDs = 32[]
--[0] = 0
--[1] = 0
--[2] = 0
--[3] = 0
--[4] = 0
--[5] = 0
--[6] = 0
--[7] = 0
--[8] = 0
--[9] = 0
--[10] = 0
--[11] = 0
--[12] = 0
--[13] = 0
--[14] = 0
--[15] = 0
--[16] = 0
--[17] = 0
--[18] = 0
--[19] = 0
--[20] = 0
--[21] = 0
--[22] = 0
--[23] = 0
--[24] = 0
--[25] = 0
--[26] = 0
--[27] = 0
--[28] = 0
--[29] = 0
--[30] = 0
--[31] = 0
--[32] = 0
--[33] = 0
--[34] = 0
--[35] = 0
--[36] = 0
--[37] = 0
--[38] = 0
--[39] = 0
--[40] = 0
--[41] = 0
--[42] = 0
--[43] = 0
--[44] = 0
--[45] = 0
--[46] = 0
--[47] = 0
--[48] = 0
--[49] = 0
recentProcessedPackageIndex = 0
processedPackageCount = 0
skippedPackageCount = 0
<JustGotAKey>k__BackingField = 0
lastXY = {X=0,Y=0}
--x = 0
--y = 0
--Empty = {X=0,Y=0}
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,14 @@ static string NormalizeLog(string log)
using var streamReader = new StreamReader(stream);
var expected = streamReader.ReadToEnd();

// copied from DumpObjects in Common.Log.cs
// this is what we're actually testing - copied from DumpObjects in Logger.cs
var sb = new StringBuilder(1000000);
_ = Logger.PrivateDump(sb, Logger.AllLogs, "[Program logs]\r\n===============\r\n", 0, settingsDumpObjectsLevel, false);
_ = Logger.PrivateDump(sb, new Common(), "[Other Logs]\r\n===============\r\n", 0, settingsDumpObjectsLevel, false);
sb.AppendLine("[Logger Logs]\r\n===============");
sb.AppendLine("[Logger]\r\n===============");
Logger.DumpType(sb, typeof(Logger), 0, settingsDumpObjectsLevel);
sb.AppendLine("[Receiver]\r\n===============");
Logger.DumpType(sb, typeof(Receiver), 0, settingsDumpObjectsLevel);
var actual = sb.ToString();

expected = NormalizeLog(expected);
Expand Down

0 comments on commit d6cdf87

Please sign in to comment.