diff --git a/tests/ComputeSharp.D2D1.Tests/D2D1PixelShaderEffectTests.cs b/tests/ComputeSharp.D2D1.Tests/D2D1PixelShaderEffectTests.cs index 153179b06..2e62f459e 100644 --- a/tests/ComputeSharp.D2D1.Tests/D2D1PixelShaderEffectTests.cs +++ b/tests/ComputeSharp.D2D1.Tests/D2D1PixelShaderEffectTests.cs @@ -174,9 +174,14 @@ public unsafe void DefaultEffectId_MatchesValue() using ComPtr d2D1DeviceContext = D2D1Helper.CreateD2D1DeviceContext(d2D1Device.Get()); D2D1PixelShaderEffect.RegisterForD2D1Factory1(d2D1Factory2.Get(), out Guid effectId); + D2D1PixelShaderEffect.RegisterForD2D1Factory1(d2D1Factory2.Get(), out Guid effectId2); + + // Ensure that the dynamically generated GUIDs are deterministic and stable + Assert.AreEqual(Guid.Parse("F5287184-0EC7-0BC6-3942-8BFB70E77C4B"), effectId); + Assert.AreEqual(Guid.Parse("96310279-E716-D336-5097-BE516792CBF0"), effectId2); Assert.AreEqual(D2D1PixelShaderEffect.GetEffectId(), effectId); - Assert.AreNotEqual(D2D1PixelShaderEffect.GetEffectId(), effectId); + Assert.AreEqual(D2D1PixelShaderEffect.GetEffectId(), effectId2); } [D2DInputCount(0)]