Skip to content

Commit bb81a4a

Browse files
thargyPerksey
andauthored
hotfix: Inconsistent test failure (#719)
* This is the December 2021 Update (v2.11.0) (#712) * Regenerate bindings * Release notes * Apply duct tape * hotfix: Inconsistent test failure `Enum.ToString()` output is undefined when dealing with aliases, as any alias can be picked. Patched `TestChainLoadWithError` so it will pass regardless of which alias is returned. Co-authored-by: Dylan Perks <11160611+Perksey@users.noreply.github.com>
1 parent 00dae97 commit bb81a4a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Vulkan/Silk.NET.Vulkan.Tests/TestChains.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,9 @@ public void TestChainLoadWithError()
314314
Assert.Equal(2, errorsArray.Length);
315315
Assert.Equal
316316
(
317-
"The unmanaged chain has a structure type PhysicalDeviceFeatures2 at position 2; expected PhysicalDeviceAccelerationStructureFeaturesKhr",
318-
errorsArray[0]
317+
"The unmanaged chain has a structure type PhysicalDeviceFeatures2 at position 2; expected PhysicalDeviceAccelerationStructureFeatures",
318+
// PATCH: Due to the way ToString() interacts with enum aliases, the structure types may end in Khr, so removing.
319+
errorsArray[0].Replace("Khr", "")
319320
);
320321
Assert.Equal
321322
(

0 commit comments

Comments
 (0)