Exemplo n.º 1
0
 void Run(EqualityUnit <SnapshotLineRange> equalityUnit)
 {
     EqualityUtil.RunAll(
         (x, y) => x == y,
         (x, y) => x != y,
         equalityUnit);
 }
Exemplo n.º 2
0
 private void Run(EqualityUnit <SearchData> equalityUnit)
 {
     EqualityUtil.RunAll(
         (x, y) => x == y,
         (x, y) => x != y,
         equalityUnit);
 }
Exemplo n.º 3
0
 public void RunAll(
     Func <T, T, bool> compEqualsOperator,
     Func <T, T, bool> compNotEqualsOperator,
     bool skipOperators = false,
     bool skipEquatable = false)
 {
     EqualityUtil.RunAll(compEqualsOperator, compNotEqualsOperator, skipOperators, skipEquatable, this);
 }
Exemplo n.º 4
0
 public void Equality_AlternatesAreEqual()
 {
     foreach (var pair in KeyInputUtil.AlternateKeyInputPairList)
     {
         var unit = EqualityUnit.Create(pair.Item1).WithEqualValues(pair.Item2).WithNotEqualValues(KeyInputUtil.VimKeyToKeyInput(VimKey.Colon));
         EqualityUtil.RunAll(
             (x, y) => x == y,
             (x, y) => x != y,
             values: unit);
     }
 }
Exemplo n.º 5
0
        public void Equality_ControlLetterIsCaseInsensitive()
        {
            var unit = EqualityUnit.Create(KeyInputUtil.CharWithControlToKeyInput('a'))
                       .WithEqualValues(KeyInputUtil.CharWithControlToKeyInput('A'))
                       .WithNotEqualValues(KeyInputUtil.CharToKeyInput('a'));

            EqualityUtil.RunAll(
                (x, y) => x == y,
                (x, y) => x != y,
                values: unit);
        }
Exemplo n.º 6
0
 public void Equality_Operator()
 {
     Create("cat", "dog");
     EqualityUtil.RunAll(
         (left, right) => left == right,
         (left, right) => left != right,
         false,
         false,
         EqualityUnit.Create(new CharacterSpan(_textBuffer.GetPoint(0), 1, 2))
         .WithEqualValues(new CharacterSpan(_textBuffer.GetPoint(0), 1, 2))
         .WithNotEqualValues(new CharacterSpan(_textBuffer.GetPoint(1), 1, 2)));
 }
Exemplo n.º 7
0
        public void Equality5()
        {
            var values = EqualityUnit
                         .Create(KeyInputUtil.CharToKeyInput('c'))
                         .WithEqualValues(KeyInputUtil.CharToKeyInput('c'))
                         .WithNotEqualValues(KeyInputUtil.CharToKeyInput('d'))
                         .WithNotEqualValues(KeyInputUtil.CharWithControlToKeyInput('c'));

            EqualityUtil.RunAll(
                (x, y) => x == y,
                (x, y) => x != y,
                values: values);
        }
Exemplo n.º 8
0
 public void Equality()
 {
     EqualityUtil.RunAll(
         (left, right) => left == right,
         (left, right) => left != right,
         false,
         true,
         EqualityUnit.Create(CreateOne('a')).WithEqualValues(CreateOne('a')),
         EqualityUnit.Create(CreateOne('a')).WithNotEqualValues(CreateOne('b')),
         EqualityUnit.Create(CreateOne('a')).WithEqualValues(CreateMany('a')),
         EqualityUnit.Create(CreateOne('D')).WithEqualValues(KeyNotationUtil.StringToKeyInputSet("D")),
         EqualityUnit.Create(new KeyInputSet(KeyInputUtil.CharToKeyInput('D'))).WithEqualValues(KeyNotationUtil.StringToKeyInputSet("D")));
 }
Exemplo n.º 9
0
 private void Run <T>(T value, T otherValue)
 {
     EqualityUtil.RunAll(EqualityUnit.Create(value)
                         .WithEqualValues(value)
                         .WithNotEqualValues(otherValue));
 }
Exemplo n.º 10
0
 private void Run(EqualityUnit <CharSpan> equalityUnit)
 {
     EqualityUtil.RunAll(equalityUnit);
 }