Browse Source

Ensure we can set double properties with ints.

pull/58/head
Steven Kirk 11 years ago
parent
commit
630d0330ea
  1. 11
      Tests/Perspex.Base.UnitTests/PerspexObjectTests.cs

11
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<string> BarProperty =
PerspexProperty.Register<Class2, string>("Bar", "bardefault");
public static readonly PerspexProperty<double> FlobProperty =
PerspexProperty.Register<Class2, double>("Flob");
static Class2()
{
FooProperty.OverrideDefaultValue(typeof(Class2), "foooverride");

Loading…
Cancel
Save