Browse Source

Fix tests failing due to previous layout fix.

The test expectations were incorrect after stretch layout with absolute
size fix.
pull/171/head
Steven Kirk 11 years ago
parent
commit
3693193246
  1. 1
      src/Perspex.Controls/Primitives/Thumb.cs
  2. 3
      tests/Perspex.Controls.UnitTests/Primitives/TrackTests.cs
  3. 4
      tests/Perspex.SceneGraph.UnitTests/VisualTree/BoundsTrackerTests.cs

1
src/Perspex.Controls/Primitives/Thumb.cs

@ -4,6 +4,7 @@
using System;
using Perspex.Input;
using Perspex.Interactivity;
using Perspex.Layout;
namespace Perspex.Controls.Primitives
{

3
tests/Perspex.Controls.UnitTests/Primitives/TrackTests.cs

@ -60,6 +60,7 @@ namespace Perspex.Controls.UnitTests.Primitives
Orientation = Orientation.Horizontal,
Minimum = 100,
Maximum = 200,
Height = 12,
Value = 150,
ViewportSize = 50,
};
@ -86,6 +87,7 @@ namespace Perspex.Controls.UnitTests.Primitives
Maximum = 300,
Value = 150,
ViewportSize = 50,
Width = 12,
};
target.Measure(new Size(100, 100));
@ -104,6 +106,7 @@ namespace Perspex.Controls.UnitTests.Primitives
var target = new Track
{
Height = 12,
Thumb = thumb,
Orientation = Orientation.Horizontal,
Minimum = 100,

4
tests/Perspex.SceneGraph.UnitTests/VisualTree/BoundsTrackerTests.cs

@ -40,13 +40,13 @@ namespace Perspex.SceneGraph.UnitTests.VisualTree
var results = new List<TransformedBounds>();
track.Subscribe(results.Add);
Assert.Equal(new Rect(15, 15, 15, 15), results.Last().Bounds);
Assert.Equal(new Rect(42, 42, 15, 15), results.Last().Bounds);
tree.Padding = new Thickness(15);
tree.Measure(Size.Infinity);
tree.Arrange(new Rect(0, 0, 100, 100), true);
Assert.Equal(new Rect(20, 20, 15, 15), results.Last().Bounds);
Assert.Equal(new Rect(42, 42, 15, 15), results.Last().Bounds);
}
}
}

Loading…
Cancel
Save