diff --git a/ObjectLayoutInspector.Tests.X64/AsyncStateMachineLayoutTests.cs b/ObjectLayoutInspector.Tests.X64/AsyncStateMachineLayoutTests.cs
new file mode 100644
index 0000000..accf8b6
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X64/AsyncStateMachineLayoutTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X64
+{
+ [TestFixture]
+ public class AsyncStateMachineLayoutTests : Tests.AsyncStateMachineLayoutTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X64/ClassLayoutTests.cs b/ObjectLayoutInspector.Tests.X64/ClassLayoutTests.cs
new file mode 100644
index 0000000..a4c3f15
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X64/ClassLayoutTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X64
+{
+ [TestFixture]
+ public class ClassLayoutTests : Tests.ClassLayoutTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X64/ClassWithExplicitLayoutTests.cs b/ObjectLayoutInspector.Tests.X64/ClassWithExplicitLayoutTests.cs
new file mode 100644
index 0000000..dd3e1f7
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X64/ClassWithExplicitLayoutTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X64
+{
+ [TestFixture]
+ public class ClassWithExplicitLayoutTests : Tests.ClassWithExplicitLayoutTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X64/ClassWithNestedStructPrinterTests.cs b/ObjectLayoutInspector.Tests.X64/ClassWithNestedStructPrinterTests.cs
new file mode 100644
index 0000000..0b0cbea
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X64/ClassWithNestedStructPrinterTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X64
+{
+ [TestFixture]
+ public class ClassWithNestedStructPrinterTests : Tests.ClassWithNestedStructPrinterTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X64/ComplexUnsafeLayoutTests.cs b/ObjectLayoutInspector.Tests.X64/ComplexUnsafeLayoutTests.cs
new file mode 100644
index 0000000..9ce7074
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X64/ComplexUnsafeLayoutTests.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X64
+{
+ [TestFixture]
+ public class ComplexUnsafeLayoutTests : Tests.ComplexUnsafeLayoutTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X64/CorefxTypesTests.cs b/ObjectLayoutInspector.Tests.X64/CorefxTypesTests.cs
new file mode 100644
index 0000000..6272828
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X64/CorefxTypesTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X64
+{
+ [TestFixture]
+ public class CorefxTypesTests : Tests.CorefxTypesTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X64/ExcessivePaddings.cs b/ObjectLayoutInspector.Tests.X64/ExcessivePaddings.cs
new file mode 100644
index 0000000..9cdac40
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X64/ExcessivePaddings.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X64
+{
+ [TestFixture]
+ public class ExcessivePaddings : Tests.ExcessivePaddings
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X64/FixedTests.cs b/ObjectLayoutInspector.Tests.X64/FixedTests.cs
new file mode 100644
index 0000000..bd93392
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X64/FixedTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X64
+{
+ [TestFixture]
+ public class FixedTests : Tests.FixedTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X64/GenericStructsTests.cs b/ObjectLayoutInspector.Tests.X64/GenericStructsTests.cs
new file mode 100644
index 0000000..37006e4
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X64/GenericStructsTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X64
+{
+ [TestFixture]
+ public class GenericStructsTests : Tests.GenericStructsTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X64/InstanceSizeTests.cs b/ObjectLayoutInspector.Tests.X64/InstanceSizeTests.cs
new file mode 100644
index 0000000..8db8976
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X64/InstanceSizeTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X64
+{
+ [TestFixture]
+ public class InstanceSizeTests : Tests.InstanceSizeTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X64/NullableTests.cs b/ObjectLayoutInspector.Tests.X64/NullableTests.cs
new file mode 100644
index 0000000..4d7cebd
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X64/NullableTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X64
+{
+ [TestFixture]
+ public class NullableTests : Tests.NullableTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X64/ObjectLayoutInspector.Tests.X64.csproj b/ObjectLayoutInspector.Tests.X64/ObjectLayoutInspector.Tests.X64.csproj
new file mode 100644
index 0000000..7ae51c3
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X64/ObjectLayoutInspector.Tests.X64.csproj
@@ -0,0 +1,20 @@
+
+
+
+ netcoreapp3.0;netcoreapp3.1;net6;net9;net8;net481
+ 8.0
+ enable
+ true
+ x64
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ObjectLayoutInspector.Tests.X64/PaddingTests.cs b/ObjectLayoutInspector.Tests.X64/PaddingTests.cs
new file mode 100644
index 0000000..f78060a
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X64/PaddingTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X64
+{
+ [TestFixture]
+ public class PaddingTests : Tests.PaddingTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X64/RawLayoutTests.cs b/ObjectLayoutInspector.Tests.X64/RawLayoutTests.cs
new file mode 100644
index 0000000..afb3c66
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X64/RawLayoutTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X64
+{
+ [TestFixture]
+ public class RawLayoutTests : Tests.RawLayoutTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X64/StructLayoutTests.cs b/ObjectLayoutInspector.Tests.X64/StructLayoutTests.cs
new file mode 100644
index 0000000..fedcd94
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X64/StructLayoutTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X64
+{
+ [TestFixture]
+ public class StructLayoutTests : Tests.StructLayoutTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X64/StructSizeTests.cs b/ObjectLayoutInspector.Tests.X64/StructSizeTests.cs
new file mode 100644
index 0000000..3fe157d
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X64/StructSizeTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X64
+{
+ [TestFixture]
+ public class StructSizeTests : Tests.StructSizeTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X64/StructWithExplicitLayoutTests.cs b/ObjectLayoutInspector.Tests.X64/StructWithExplicitLayoutTests.cs
new file mode 100644
index 0000000..a3505d2
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X64/StructWithExplicitLayoutTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X64
+{
+ [TestFixture]
+ public class StructWithExplicitLayoutTests : Tests.StructWithExplicitLayoutTests
+ {
+ }
+}
diff --git a/ObjectLayoutInspector.Tests.X64/UnsafeLayoutTests.cs b/ObjectLayoutInspector.Tests.X64/UnsafeLayoutTests.cs
new file mode 100644
index 0000000..e8562ef
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X64/UnsafeLayoutTests.cs
@@ -0,0 +1,10 @@
+using NUnit.Framework;
+using NUnit.Framework.Internal;
+
+namespace ObjectLayoutInspector.Tests.X64
+{
+ [TestFixture]
+ public class UnsafeLayoutTests : Tests.UnsafeLayoutTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X86/AsyncStateMachineLayoutTests.cs b/ObjectLayoutInspector.Tests.X86/AsyncStateMachineLayoutTests.cs
new file mode 100644
index 0000000..2662aa9
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X86/AsyncStateMachineLayoutTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X86
+{
+ [TestFixture]
+ public class AsyncStateMachineLayoutTests : Tests.AsyncStateMachineLayoutTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X86/ClassLayoutTests.cs b/ObjectLayoutInspector.Tests.X86/ClassLayoutTests.cs
new file mode 100644
index 0000000..8b35396
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X86/ClassLayoutTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X86
+{
+ [TestFixture]
+ public class ClassLayoutTests : Tests.ClassLayoutTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X86/ClassWithExplicitLayoutTests.cs b/ObjectLayoutInspector.Tests.X86/ClassWithExplicitLayoutTests.cs
new file mode 100644
index 0000000..1db9cac
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X86/ClassWithExplicitLayoutTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X86
+{
+ [TestFixture]
+ public class ClassWithExplicitLayoutTests : Tests.ClassWithExplicitLayoutTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X86/ClassWithNestedStructPrinterTests.cs b/ObjectLayoutInspector.Tests.X86/ClassWithNestedStructPrinterTests.cs
new file mode 100644
index 0000000..c37bb57
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X86/ClassWithNestedStructPrinterTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X86
+{
+ [TestFixture]
+ public class ClassWithNestedStructPrinterTests : Tests.ClassWithNestedStructPrinterTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X86/ComplexUnsafeLayoutTests.cs b/ObjectLayoutInspector.Tests.X86/ComplexUnsafeLayoutTests.cs
new file mode 100644
index 0000000..cd3dc50
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X86/ComplexUnsafeLayoutTests.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X86
+{
+ [TestFixture]
+ public class ComplexUnsafeLayoutTests : Tests.ComplexUnsafeLayoutTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X86/CorefxTypesTests.cs b/ObjectLayoutInspector.Tests.X86/CorefxTypesTests.cs
new file mode 100644
index 0000000..da5412e
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X86/CorefxTypesTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X86
+{
+ [TestFixture]
+ public class CorefxTypesTests : Tests.CorefxTypesTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X86/ExcessivePaddings.cs b/ObjectLayoutInspector.Tests.X86/ExcessivePaddings.cs
new file mode 100644
index 0000000..68c72d4
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X86/ExcessivePaddings.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X86
+{
+ [TestFixture]
+ public class ExcessivePaddings : Tests.ExcessivePaddings
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X86/FixedTests.cs b/ObjectLayoutInspector.Tests.X86/FixedTests.cs
new file mode 100644
index 0000000..26adc81
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X86/FixedTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X86
+{
+ [TestFixture]
+ public class FixedTests : Tests.FixedTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X86/GenericStructsTests.cs b/ObjectLayoutInspector.Tests.X86/GenericStructsTests.cs
new file mode 100644
index 0000000..fc4051a
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X86/GenericStructsTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X86
+{
+ [TestFixture]
+ public class GenericStructsTests : Tests.GenericStructsTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X86/InstanceSizeTests.cs b/ObjectLayoutInspector.Tests.X86/InstanceSizeTests.cs
new file mode 100644
index 0000000..8c11249
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X86/InstanceSizeTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X86
+{
+ [TestFixture]
+ public class InstanceSizeTests : Tests.InstanceSizeTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X86/NullableTests.cs b/ObjectLayoutInspector.Tests.X86/NullableTests.cs
new file mode 100644
index 0000000..d0d0e3f
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X86/NullableTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X86
+{
+ [TestFixture]
+ public class NullableTests : Tests.NullableTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X86/ObjectLayoutInspector.Tests.X86.csproj b/ObjectLayoutInspector.Tests.X86/ObjectLayoutInspector.Tests.X86.csproj
new file mode 100644
index 0000000..f598492
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X86/ObjectLayoutInspector.Tests.X86.csproj
@@ -0,0 +1,21 @@
+
+
+
+ netcoreapp3.0;netcoreapp3.1;net9;net8;net481
+ 8.0
+ enable
+ true
+ x86
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ObjectLayoutInspector.Tests.X86/PaddingTests.cs b/ObjectLayoutInspector.Tests.X86/PaddingTests.cs
new file mode 100644
index 0000000..9b5a3c9
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X86/PaddingTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X86
+{
+ [TestFixture]
+ public class PaddingTests : Tests.PaddingTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X86/RawLayoutTests.cs b/ObjectLayoutInspector.Tests.X86/RawLayoutTests.cs
new file mode 100644
index 0000000..a132728
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X86/RawLayoutTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X86
+{
+ [TestFixture]
+ public class RawLayoutTests : Tests.RawLayoutTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X86/StructLayoutTests.cs b/ObjectLayoutInspector.Tests.X86/StructLayoutTests.cs
new file mode 100644
index 0000000..96ce979
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X86/StructLayoutTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X86
+{
+ [TestFixture]
+ public class StructLayoutTests : Tests.StructLayoutTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X86/StructSizeTests.cs b/ObjectLayoutInspector.Tests.X86/StructSizeTests.cs
new file mode 100644
index 0000000..81047bc
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X86/StructSizeTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X86
+{
+ [TestFixture]
+ public class StructSizeTests : Tests.StructSizeTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.Tests.X86/StructWithExplicitLayoutTests.cs b/ObjectLayoutInspector.Tests.X86/StructWithExplicitLayoutTests.cs
new file mode 100644
index 0000000..d5cb2a7
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X86/StructWithExplicitLayoutTests.cs
@@ -0,0 +1,9 @@
+using NUnit.Framework;
+
+namespace ObjectLayoutInspector.Tests.X86
+{
+ [TestFixture]
+ public class StructWithExplicitLayoutTests : Tests.StructWithExplicitLayoutTests
+ {
+ }
+}
diff --git a/ObjectLayoutInspector.Tests.X86/UnsafeLayoutTests.cs b/ObjectLayoutInspector.Tests.X86/UnsafeLayoutTests.cs
new file mode 100644
index 0000000..09dbc61
--- /dev/null
+++ b/ObjectLayoutInspector.Tests.X86/UnsafeLayoutTests.cs
@@ -0,0 +1,10 @@
+using NUnit.Framework;
+using NUnit.Framework.Internal;
+
+namespace ObjectLayoutInspector.Tests.X86
+{
+ [TestFixture]
+ public class UnsafeLayoutTests : Tests.UnsafeLayoutTests
+ {
+ }
+}
\ No newline at end of file
diff --git a/ObjectLayoutInspector.sln b/ObjectLayoutInspector.sln
index 7197cdb..131407f 100644
--- a/ObjectLayoutInspector.sln
+++ b/ObjectLayoutInspector.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 16
-VisualStudioVersion = 16.0.28803.156
+# Visual Studio Version 17
+VisualStudioVersion = 17.12.35728.132 d17.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ObjectLayoutInspector", "src\ObjectLayoutInspector\ObjectLayoutInspector.csproj", "{D89F0520-ED92-4413-BCB2-5365C13447EB}"
EndProject
@@ -9,6 +9,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectLayoutInspector.Tests
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectLayoutInspector.Benchmarks", "src\ObjectLayoutInspector.Benchmarks\ObjectLayoutInspector.Benchmarks.csproj", "{B7CA1732-19EB-43B7-9D51-04A7984F03D7}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectLayoutInspector.Tests.X86", "ObjectLayoutInspector.Tests.X86\ObjectLayoutInspector.Tests.X86.csproj", "{172B168F-FE58-49CB-AF90-669FB96FC077}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectLayoutInspector.Tests.X64", "ObjectLayoutInspector.Tests.X64\ObjectLayoutInspector.Tests.X64.csproj", "{0780619B-6219-4C3D-81F9-CE59A9498B10}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -27,6 +31,14 @@ Global
{B7CA1732-19EB-43B7-9D51-04A7984F03D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B7CA1732-19EB-43B7-9D51-04A7984F03D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B7CA1732-19EB-43B7-9D51-04A7984F03D7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {172B168F-FE58-49CB-AF90-669FB96FC077}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {172B168F-FE58-49CB-AF90-669FB96FC077}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {172B168F-FE58-49CB-AF90-669FB96FC077}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {172B168F-FE58-49CB-AF90-669FB96FC077}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0780619B-6219-4C3D-81F9-CE59A9498B10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0780619B-6219-4C3D-81F9-CE59A9498B10}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0780619B-6219-4C3D-81F9-CE59A9498B10}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0780619B-6219-4C3D-81F9-CE59A9498B10}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/src/ObjectLayoutInspector.Benchmarks/TypeVsRecursiveVsFlat.cs b/src/ObjectLayoutInspector.Benchmarks/TypeVsRecursiveVsFlat.cs
index 5038bde..2887f1c 100644
--- a/src/ObjectLayoutInspector.Benchmarks/TypeVsRecursiveVsFlat.cs
+++ b/src/ObjectLayoutInspector.Benchmarks/TypeVsRecursiveVsFlat.cs
@@ -1,6 +1,6 @@
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Jobs;
-using ObjectLayoutInspector.Tests;
+using ObjectLayoutInspector.Tests.Structs;
namespace ObjectLayoutInspector.Benchmarks
{
diff --git a/src/ObjectLayoutInspector.Tests/AsyncStateMachineLayoutTests.cs b/src/ObjectLayoutInspector.Tests/AsyncStateMachineLayoutTests.cs
index d9b06b0..de14297 100644
--- a/src/ObjectLayoutInspector.Tests/AsyncStateMachineLayoutTests.cs
+++ b/src/ObjectLayoutInspector.Tests/AsyncStateMachineLayoutTests.cs
@@ -15,11 +15,13 @@ public async Task WithTask()
return 42;
}
+#if NET6_0_OR_GREATER || NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
public async ValueTask WithValueTask()
{
await Task.Yield();
return 42;
}
+#endif
}
[TestFixture]
@@ -32,12 +34,14 @@ public void AsyncTaskStateMachineLayout()
TypeLayout.PrintLayout(taskStateMachine);
}
+#if NET6_0_OR_GREATER || NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
[Test]
public void AsyncValueTaskStateMachineLayout()
{
var (_, valueTask) = GetStateMachineTypes();
TypeLayout.PrintLayout(valueTask);
}
+#endif
private static (Type taskStateMachine, Type valueTaskStateMachine) GetStateMachineTypes()
{
@@ -45,8 +49,14 @@ private static (Type taskStateMachine, Type valueTaskStateMachine) GetStateMachi
t.FullName!.Contains("AsyncSample") && t.FullName.Contains(">d__")).ToList();
var taskStateMachine = types.First(t => t.FullName!.Contains(nameof(AsyncSample.WithTask)));
+
+#if NET6_0_OR_GREATER || NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
var valueTaskStateMachine = types.First(t => t.FullName!.Contains(nameof(AsyncSample.WithValueTask)));
+
return (taskStateMachine, valueTaskStateMachine);
+#else
+ return (taskStateMachine, null!);
+#endif
}
}
-}
\ No newline at end of file
+ }
\ No newline at end of file
diff --git a/src/ObjectLayoutInspector.Tests/ClassLayoutTests.cs b/src/ObjectLayoutInspector.Tests/ClassLayoutTests.cs
index a07162b..bc0b6ec 100644
--- a/src/ObjectLayoutInspector.Tests/ClassLayoutTests.cs
+++ b/src/ObjectLayoutInspector.Tests/ClassLayoutTests.cs
@@ -1,5 +1,6 @@
using NUnit.Framework;
using NUnit.Framework.Internal;
+using ObjectLayoutInspector.Tests.Objects;
namespace ObjectLayoutInspector.Tests
{
diff --git a/src/ObjectLayoutInspector.Tests/ClassWithExplicitLayoutTests.cs b/src/ObjectLayoutInspector.Tests/ClassWithExplicitLayoutTests.cs
index acc9637..866c3db 100644
--- a/src/ObjectLayoutInspector.Tests/ClassWithExplicitLayoutTests.cs
+++ b/src/ObjectLayoutInspector.Tests/ClassWithExplicitLayoutTests.cs
@@ -1,4 +1,5 @@
using NUnit.Framework;
+using ObjectLayoutInspector.Tests.Objects;
namespace ObjectLayoutInspector.Tests
{
diff --git a/src/ObjectLayoutInspector.Tests/ClassWithNestedStructPrinterTests.cs b/src/ObjectLayoutInspector.Tests/ClassWithNestedStructPrinterTests.cs
index 6227825..e9dc833 100644
--- a/src/ObjectLayoutInspector.Tests/ClassWithNestedStructPrinterTests.cs
+++ b/src/ObjectLayoutInspector.Tests/ClassWithNestedStructPrinterTests.cs
@@ -1,4 +1,7 @@
using NUnit.Framework;
+using ObjectLayoutInspector.Tests.Objects;
+using ObjectLayoutInspector.Tests.Structs;
+using System;
namespace ObjectLayoutInspector.Tests
{
@@ -9,6 +12,35 @@ public class ClassWithNestedStructPrinterTests
public void Print()
{
TypeLayout.PrintLayout();
+ var lo = TypeLayout.GetLayout();
+ }
+
+ [Test]
+ public void PrintString()
+ {
+ TypeLayout.PrintLayout();
+ var lo = TypeLayout.GetLayout();
+ }
+
+ [Test]
+ public void PrintObject()
+ {
+ TypeLayout.PrintLayout