-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
340 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Microsoft.FSharp.Collections; | ||
using NUnit.Framework; | ||
using Vim; | ||
using Vim.Extensions; | ||
|
||
namespace VimCore.UnitTest | ||
{ | ||
[TestFixture] | ||
public sealed class KeyInputSetTest | ||
{ | ||
[Test] | ||
public void Compare_AlternateKeyInputShouldBeEqual() | ||
{ | ||
var left = KeyInputSet.NewOneKeyInput(KeyInputUtil.EnterKey); | ||
var right = KeyInputSet.NewOneKeyInput(KeyInputUtil.AlternateEnterKey); | ||
Assert.IsTrue(0 == left.CompareTo(right)); | ||
Assert.IsTrue(0 == right.CompareTo(left)); | ||
} | ||
|
||
[Test] | ||
public void Compare_AlternateKeyInputShouldBeEqualInMap() | ||
{ | ||
var left = KeyInputSet.NewOneKeyInput(KeyInputUtil.EnterKey); | ||
var right = KeyInputSet.NewOneKeyInput(KeyInputUtil.AlternateEnterKey); | ||
var map = MapModule.Empty<KeyInputSet, bool>().Add(left, true); | ||
var result = MapModule.TryFind(right, map); | ||
Assert.IsTrue(result.IsSome()); | ||
|
||
map = MapModule.Empty<KeyInputSet, bool>().Add(right, true); | ||
result = MapModule.TryFind(left, map); | ||
Assert.IsTrue(result.IsSome()); | ||
} | ||
} | ||
} |
Oops, something went wrong.