Skip to content

Commit

Permalink
Make unit test representative
Browse files Browse the repository at this point in the history
  • Loading branch information
Perksey committed Dec 30, 2023
1 parent 5be25b8 commit 7f7b3ad
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions tests/SilkTouch/Naming/NameTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@ namespace Silk.NET.SilkTouch.UnitTests.Naming;
[TestFixture]
public class NameTests : NameTrimmer
{
protected override string GetTrimmingName(Dictionary<string, string>? prefixOverrides, string name,
bool isContainer)
{
var ret = base.GetTrimmingName(prefixOverrides, name, isContainer);
Console.WriteLine(ret);
return ret;
}

[Test]
public void SimpleGlfwTestDetermination()
{
Expand All @@ -30,7 +22,7 @@ public void SimpleGlfwTestDetermination()
{ "GLFWmonitor", ("GLFWmonitor", null) },
{ "GLFWwindow", ("GLFWwindow", null) }
};
Assert.That(GetPrefix(null, null, test, null, true, false)?.Prefix, Is.EqualTo("GLFW_"));
Assert.That(GetPrefix(null, null, test, null, false, true)?.Prefix, Is.EqualTo("GLFW"));
Trim(null, null, "GLFW", test, null);
var expected = new Dictionary<string, string> {
{ "GLFWallocator", "Allocator" },
Expand All @@ -45,7 +37,7 @@ public void SimpleGlfwTestDetermination()
};
foreach (var (key, (trimmed, _)) in test)
{
Assert.That(trimmed, Is.EqualTo(expected[key]));
Assert.That(trimmed.Prettify(), Is.EqualTo(expected[key]));
}
}
}

0 comments on commit 7f7b3ad

Please sign in to comment.