Fixed stuff

This commit is contained in:
Tig
2024-06-13 10:37:57 -07:00
parent f02ca8abc0
commit f0984f08f8
3 changed files with 16 additions and 18 deletions

View File

@@ -218,7 +218,7 @@ public class AlignerTests (ITestOutputHelper output)
[InlineData (Alignment.Start, AlignmentModes.StartToEnd | AlignmentModes.AddSpaceBetweenItems | AlignmentModes.IgnoreFirstOrLast, new [] { 1, 2, 3 }, 9, new [] { 0, 2, 6 })]
[InlineData (Alignment.Start, AlignmentModes.StartToEnd | AlignmentModes.AddSpaceBetweenItems | AlignmentModes.IgnoreFirstOrLast, new [] { 1, 2, 3 }, 10, new [] { 0, 2, 7 })]
[InlineData (Alignment.Start, AlignmentModes.StartToEnd | AlignmentModes.AddSpaceBetweenItems | AlignmentModes.IgnoreFirstOrLast, new [] { 1, 2, 3 }, 11, new [] { 0, 2, 8 })]
[InlineData (Alignment.Start, AlignmentModes.StartToEnd | AlignmentModes.AddSpaceBetweenItems | AlignmentModes.IgnoreFirstOrLast, new [] { 1, 2, 3 }, 5, new [] { -1, 0, 2 })] // 5 is too small to fit the items. The first item is at -1.})]
[InlineData (Alignment.Start, AlignmentModes.StartToEnd | AlignmentModes.AddSpaceBetweenItems | AlignmentModes.IgnoreFirstOrLast, new [] { 1, 2, 3 }, 5, new [] { 0, 1, 2 })]
[InlineData (Alignment.Start, AlignmentModes.StartToEnd | AlignmentModes.AddSpaceBetweenItems | AlignmentModes.IgnoreFirstOrLast, new [] { 1, 2, 3, 4 }, 10, new [] { 0, 1, 3, 6 })]
[InlineData (Alignment.Start, AlignmentModes.StartToEnd | AlignmentModes.AddSpaceBetweenItems | AlignmentModes.IgnoreFirstOrLast, new [] { 1, 2, 3, 4 }, 11, new [] { 0, 2, 4, 7 })]
[InlineData (Alignment.Start, AlignmentModes.StartToEnd | AlignmentModes.AddSpaceBetweenItems | AlignmentModes.IgnoreFirstOrLast, new [] { 3, 3, 3 }, 21, new [] { 0, 4, 18 })]

View File

@@ -22,20 +22,20 @@ public class ShortcutTests
}
[Theory]
[InlineData ("", "", KeyCode.Null, 0)]
[InlineData ("", "", KeyCode.Null, 2)]
[InlineData ("C", "", KeyCode.Null, 3)]
[InlineData ("", "H", KeyCode.Null, 3)]
[InlineData ("", "", KeyCode.K, 3)]
[InlineData ("", "H", KeyCode.Null, 5)]
[InlineData ("", "", KeyCode.K, 5)]
[InlineData ("C", "", KeyCode.K, 6)]
[InlineData ("C", "H", KeyCode.Null, 6)]
[InlineData ("", "H", KeyCode.K, 6)]
[InlineData ("", "H", KeyCode.K, 8)]
[InlineData ("C", "H", KeyCode.K, 9)]
public void NaturalSize (string command, string help, Key key, int expectedWidth)
{
Shortcut shortcut = new Shortcut ()
{
Title = command,
Text = help,
HelpText = help,
Key = key,
};
@@ -79,7 +79,7 @@ public class ShortcutTests
}
[Fact]
public void CommandView_Text_And_Title_Are_The_Same ()
public void CommandView_Text_And_Title_Track ()
{
Shortcut shortcut = new Shortcut ()
{
@@ -88,12 +88,6 @@ public class ShortcutTests
Assert.Equal (shortcut.Title, shortcut.CommandView.Text);
shortcut = new Shortcut ()
{
};
shortcut.CommandView.Text = "T";
Assert.Equal (shortcut.Title, shortcut.CommandView.Text);
shortcut = new Shortcut ()
{
};