Skip to content

Commit

Permalink
fix: add logs to debug unit test issues
Browse files Browse the repository at this point in the history
  • Loading branch information
LSViana committed Dec 3, 2023
1 parent 14a1b27 commit f01eb2d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions YDotNet/Infrastructure/MemoryReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ internal static byte[] ReadBytes(nint handle, uint length)
{
var data = new byte[length];

Console.WriteLine($"(1) Data: {data == null} | {data.Length} | Handle={handle} | Length={length}");

Marshal.Copy(handle, data, startIndex: 0, (int) length);

Console.WriteLine("(2) Copied to data");

return data;
}

Expand Down
3 changes: 3 additions & 0 deletions YDotNet/Native/UndoManager/Events/UndoEventNative.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ internal struct UndoEventNative
return null;
}

Console.WriteLine($"OriginHandle: {OriginHandle}");
Console.WriteLine($"OriginLength: {OriginLength}");

return MemoryReader.ReadBytes(OriginHandle, OriginLength);
}
}

0 comments on commit f01eb2d

Please sign in to comment.