Skip to content

Commit

Permalink
More debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
kleisauke committed May 9, 2024
1 parent c52ce1a commit c74a782
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/NetVips/VipsProgress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ public struct VipsProgress
/// <summary>
/// Start time.
/// </summary>
private IntPtr StartPtr;
public IntPtr Start;
}
}
6 changes: 4 additions & 2 deletions tests/NetVips.Tests/IoFuncsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace NetVips.Tests
using System.Runtime.InteropServices;
using Xunit;
using Xunit.Abstractions;
using ObjectLayoutInspector;

public class IoFuncsTests : IClassFixture<TestsFixture>
{
Expand Down Expand Up @@ -245,10 +246,11 @@ void EvalCallback(Image image, VipsProgress progressStruct)
_testOutputHelper.WriteLine($" tpels = {progressStruct.TPels} (total number of pels)");
_testOutputHelper.WriteLine($" npels = {progressStruct.NPels} (number of pels computed so far)");
_testOutputHelper.WriteLine($" percent = {progressStruct.Percent} (percent complete)");
//_testOutputHelper.WriteLine($" active = {progressStruct.Start.Active} (timer active)");
//_testOutputHelper.WriteLine($" active = {Marshal.PtrToStructure<GTimer>(progressStruct.Start).Active} (timer active)");
}

_testOutputHelper.WriteLine($"sizeof(VipsProgress): {Marshal.SizeOf<VipsProgress>()}");
_testOutputHelper.WriteLine(TypeLayout.GetLayout<VipsProgress>().ToString());
_testOutputHelper.WriteLine(TypeLayout.GetLayout<GTimer>().ToString());

im.SetProgress(true);
im.SignalConnect(Enums.Signals.PreEval, EvalCallback);
Expand Down
1 change: 1 addition & 0 deletions tests/NetVips.Tests/NetVips.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" Condition="'$(MSBuildRuntimeType)' == 'Mono'" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="ObjectLayoutInspector" Version="0.1.4" />
<PackageReference Include="xunit" Version="2.8.1-pre.9" />
<PackageReference Include="Xunit.SkippableFact" Version="1.4.13" />
</ItemGroup>
Expand Down

0 comments on commit c74a782

Please sign in to comment.