mirror of https://github.com/ppy/osu
Add failing assertions for head/tail positions after flip
This commit is contained in:
parent
f927cb5928
commit
a934556bb8
|
@ -45,7 +45,9 @@ public void TestReflectSliderHorizontallyAlongPlayfield()
|
|||
OsuHitObjectGenerationUtils.ReflectHorizontallyAlongPlayfield(slider);
|
||||
|
||||
Assert.That(slider.Position, Is.EqualTo(new Vector2(OsuPlayfield.BASE_SIZE.X - 128, 128)));
|
||||
Assert.That(slider.NestedHitObjects.OfType<SliderHeadCircle>().Single().Position, Is.EqualTo(new Vector2(OsuPlayfield.BASE_SIZE.X - 128, 128)));
|
||||
Assert.That(slider.NestedHitObjects.OfType<SliderRepeat>().First().Position, Is.EqualTo(new Vector2(OsuPlayfield.BASE_SIZE.X - 0, 128)));
|
||||
Assert.That(slider.NestedHitObjects.OfType<SliderTailCircle>().Single().Position, Is.EqualTo(new Vector2(OsuPlayfield.BASE_SIZE.X, 128)));
|
||||
Assert.That(slider.Path.ControlPoints.Select(point => point.Position), Is.EquivalentTo(new[]
|
||||
{
|
||||
new Vector2(),
|
||||
|
@ -62,7 +64,9 @@ public void TestReflectSliderVerticallyAlongPlayfield()
|
|||
OsuHitObjectGenerationUtils.ReflectVerticallyAlongPlayfield(slider);
|
||||
|
||||
Assert.That(slider.Position, Is.EqualTo(new Vector2(128, OsuPlayfield.BASE_SIZE.Y - 128)));
|
||||
Assert.That(slider.NestedHitObjects.OfType<SliderHeadCircle>().Single().Position, Is.EqualTo(new Vector2(128, OsuPlayfield.BASE_SIZE.Y - 128)));
|
||||
Assert.That(slider.NestedHitObjects.OfType<SliderRepeat>().First().Position, Is.EqualTo(new Vector2(0, OsuPlayfield.BASE_SIZE.Y - 128)));
|
||||
Assert.That(slider.NestedHitObjects.OfType<SliderTailCircle>().Single().Position, Is.EqualTo(new Vector2(0, OsuPlayfield.BASE_SIZE.Y - 128)));
|
||||
Assert.That(slider.Path.ControlPoints.Select(point => point.Position), Is.EquivalentTo(new[]
|
||||
{
|
||||
new Vector2(),
|
||||
|
@ -79,7 +83,9 @@ public void TestFlipSliderInPlaceHorizontally()
|
|||
OsuHitObjectGenerationUtils.FlipSliderInPlaceHorizontally(slider);
|
||||
|
||||
Assert.That(slider.Position, Is.EqualTo(new Vector2(128, 128)));
|
||||
Assert.That(slider.NestedHitObjects.OfType<SliderHeadCircle>().Single().Position, Is.EqualTo(new Vector2(128, 128)));
|
||||
Assert.That(slider.NestedHitObjects.OfType<SliderRepeat>().First().Position, Is.EqualTo(new Vector2(256, 128)));
|
||||
Assert.That(slider.NestedHitObjects.OfType<SliderTailCircle>().Single().Position, Is.EqualTo(new Vector2(256, 128)));
|
||||
Assert.That(slider.Path.ControlPoints.Select(point => point.Position), Is.EquivalentTo(new[]
|
||||
{
|
||||
new Vector2(),
|
||||
|
|
Loading…
Reference in New Issue