Skip to content

Commit

Permalink
Fix compile error in the test case.
Browse files Browse the repository at this point in the history
  • Loading branch information
andy840119 committed May 4, 2022
1 parent f2d5b00 commit 2eb6e9f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
3 changes: 1 addition & 2 deletions osu.Framework.Font.Tests/Shaders/OutlineShaderTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ public void TestComputeScreenSpaceDrawQuad(int radius, float expectedX, float ex
Radius = radius
};

var quad = shader.ComputeScreenSpaceDrawQuad(new Quad(5, 5, 10, 10));
var rectangle = quad.AABBFloat;
var rectangle = shader.ComputeDrawRectangle(new RectangleF(5, 5, 10, 10));
Assert.AreEqual(expectedX, rectangle.X);
Assert.AreEqual(expectedY, rectangle.Y);
Assert.AreEqual(expectedWidth, rectangle.Width);
Expand Down
3 changes: 1 addition & 2 deletions osu.Framework.Font.Tests/Shaders/ShadowShaderTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ public void TestComputeScreenSpaceDrawQuad(float offsetX, float offsetY, float e
ShadowOffset = new Vector2(offsetX, offsetY)
};

var quad = shader.ComputeScreenSpaceDrawQuad(new Quad(5, 5, 10, 10));
var rectangle = quad.AABBFloat;
var rectangle = shader.ComputeDrawRectangle(new RectangleF(5, 5, 10, 10));
Assert.AreEqual(expectedX, rectangle.X);
Assert.AreEqual(expectedY, rectangle.Y);
Assert.AreEqual(expectedWidth, rectangle.Width);
Expand Down
9 changes: 3 additions & 6 deletions osu.Framework.Font.Tests/Shaders/StepShaderTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ public void TestComputeScreenSpaceDrawQuad()
}
};

var quad = shader.ComputeScreenSpaceDrawQuad(new Quad(5, 5, 10, 10));
var rectangle = quad.AABBFloat;
var rectangle = shader.ComputeDrawRectangle(new RectangleF(5, 5, 10, 10));
Assert.AreEqual(5 - outline_radius, rectangle.X);
Assert.AreEqual(5 - outline_radius, rectangle.Y);
Assert.AreEqual(10 + outline_radius * 2 + shadow_offset_x, rectangle.Width);
Expand All @@ -86,8 +85,7 @@ public void TestEmptyComputeScreenSpaceDrawQuadWithEmptyShader()
{
var shader = new StepShader();

var quad = shader.ComputeScreenSpaceDrawQuad(new Quad(5, 5, 10, 10));
var rectangle = quad.AABBFloat;
var rectangle = shader.ComputeDrawRectangle(new RectangleF(5, 5, 10, 10));
Assert.AreEqual(5, rectangle.X);
Assert.AreEqual(5, rectangle.Y);
Assert.AreEqual(10, rectangle.Width);
Expand Down Expand Up @@ -123,8 +121,7 @@ public void TestEmptyComputeScreenSpaceDrawQuadNoneMatchedShader()
}
};

var quad = shader.ComputeScreenSpaceDrawQuad(new Quad(5, 5, 10, 10));
var rectangle = quad.AABBFloat;
var rectangle = shader.ComputeDrawRectangle(new RectangleF(5, 5, 10, 10));
Assert.AreEqual(5, rectangle.X);
Assert.AreEqual(5, rectangle.Y);
Assert.AreEqual(10, rectangle.Width);
Expand Down

0 comments on commit 2eb6e9f

Please sign in to comment.