From 630d0330eae0549ddc9f7f73f0a8513dcfa586af Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Tue, 5 May 2015 12:07:14 +0200 Subject: [PATCH] Ensure we can set double properties with ints. --- Tests/Perspex.Base.UnitTests/PerspexObjectTests.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Tests/Perspex.Base.UnitTests/PerspexObjectTests.cs b/Tests/Perspex.Base.UnitTests/PerspexObjectTests.cs index b3c4d90f84..39f70462a3 100644 --- a/Tests/Perspex.Base.UnitTests/PerspexObjectTests.cs +++ b/Tests/Perspex.Base.UnitTests/PerspexObjectTests.cs @@ -171,6 +171,14 @@ namespace Perspex.Base.UnitTests }); } + [Fact] + public void SetValue_Of_Integer_On_Double_Property_Works() + { + Class2 target = new Class2(); + + target.SetValue(Class2.FlobProperty, 4); + } + [Fact] public void SetValue_Causes_Coercion() { @@ -615,6 +623,9 @@ namespace Perspex.Base.UnitTests public static readonly PerspexProperty BarProperty = PerspexProperty.Register("Bar", "bardefault"); + public static readonly PerspexProperty FlobProperty = + PerspexProperty.Register("Flob"); + static Class2() { FooProperty.OverrideDefaultValue(typeof(Class2), "foooverride");