Skip to content

Commit

Permalink
Added sanity test for every button profile
Browse files Browse the repository at this point in the history
  • Loading branch information
m4-used-rollout committed Feb 24, 2024
1 parent 54ea3aa commit 0d62db3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/TPP.Inputting.Tests/Parsing/ButtonMappingTest.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Collections.Immutable;
using NUnit.Framework;
using TPP.Core;
Expand Down Expand Up @@ -32,6 +33,14 @@ private void AssertEmptyMap(string rawInput, string? message = null)
Assert.That(mappedInputs.Keys, Has.Count.EqualTo(2), message ?? "Mapped output should contain no buttons.");
}

[Test]
public void TestBuildEveryProfile()
{
foreach (string profile in Enum.GetNames<ButtonProfile>()) {
Assert.DoesNotThrow(() => Enum.Parse<ButtonProfile>(profile).ToInputParserBuilder().Build(), $"Button Profile {profile} failed to build.");
}
}

[Test]
public void TestGameBoy()
{
Expand Down

0 comments on commit 0d62db3

Please sign in to comment.