Skip to content

Commit

Permalink
Adds Comments to TestVirtualButtonFind
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleFinix committed Jun 6, 2020
1 parent 0ef415d commit 468d166
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sources/engine/Stride.Input.Tests/TestInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -341,17 +341,23 @@ void TestGamePad()
Assert.Equal(0, Input.GamePadCount);
}

/// <summary>
/// Checks whether VirtualButton.Find works for Keyboard, Mouse and GamePad.
/// </summary>
void TestVirtualButtonFind()
{
// Test Keyboard Keys
Assert.Equal(VirtualButton.Keyboard.A, VirtualButton.Find("Keyboard.a"));
Assert.Equal(VirtualButton.Keyboard.Z, VirtualButton.Find("Keyboard.z"));
Assert.Equal(VirtualButton.Keyboard.LeftCtrl, VirtualButton.Find("Keyboard.leftctrl"));
Assert.Equal(VirtualButton.Keyboard.LeftShift, VirtualButton.Find("Keyboard.leftshift"));

// Test Mouse Buttons
Assert.Equal(VirtualButton.Mouse.Left, VirtualButton.Find("Mouse.Left"));
Assert.Equal(VirtualButton.Mouse.PositionX, VirtualButton.Find("Mouse.PositionX"));
Assert.Equal(VirtualButton.Mouse.DeltaY, VirtualButton.Find("Mouse.DeltaY"));

// Test GamePad Buttons
Assert.Equal(VirtualButton.GamePad.LeftThumbAxisX, VirtualButton.Find("GamePad.LeftThumbAxisX"));
Assert.Equal(VirtualButton.GamePad.RightThumb, VirtualButton.Find("GamePad.RightThumb"));
Assert.Equal(VirtualButton.GamePad.A, VirtualButton.Find("GamePad.A"));
Expand Down

0 comments on commit 468d166

Please sign in to comment.