Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/02/17 22:03:01 (7 years ago)
Author:
pkimmesw
Message:

#2665 Removed "this" qualifier

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/ExecExpressionTests.cs

    r14875 r14908  
    2020      get
    2121      {
    22         return this.interpreter.ExecStack;
     22        return interpreter.ExecStack;
    2323      }
    2424    }
    2525
    2626    protected override void Test(Expression expression) {
    27       this.interpreter.Run(expression, true);
    28       this.interpreter.Step();
     27      interpreter.Run(expression, true);
     28      interpreter.Step();
    2929    }
    3030
     
    3434    [TestCategory("ExecExpressionTest")]
    3535    public void TestIfTrue() {
    36       this.interpreter.BooleanStack.Push(true);
    37       this.interpreter.Run("( EXEC.IF WAHR FALSCH )");
     36      interpreter.BooleanStack.Push(true);
     37      interpreter.Run("( EXEC.IF WAHR FALSCH )");
    3838
    39       Assert.AreEqual("WAHR", this.interpreter.NameStack.Top);
    40       this.TestStackCounts(nameStack: 1);
     39      Assert.AreEqual("WAHR", interpreter.NameStack.Top);
     40      TestStackCounts(nameStack: 1);
    4141    }
    4242
     
    4646    [TestCategory("ExecExpressionTest")]
    4747    public void TestIfFalse() {
    48       this.interpreter.BooleanStack.Push(false);
    49       this.interpreter.Run("( EXEC.IF WAHR FALSCH )");
     48      interpreter.BooleanStack.Push(false);
     49      interpreter.Run("( EXEC.IF WAHR FALSCH )");
    5050
    51       Assert.AreEqual("FALSCH", this.interpreter.NameStack.Top);
    52       this.TestStackCounts(nameStack: 1);
     51      Assert.AreEqual("FALSCH", interpreter.NameStack.Top);
     52      TestStackCounts(nameStack: 1);
    5353    }
    5454
     
    8080      var result = PushParser.Parse("( B C )");
    8181
    82       this.interpreter.ExecStack.Push(third, second, first);
    83       this.Test(new ExecSExpression());
     82      interpreter.ExecStack.Push(third, second, first);
     83      Test(new ExecSExpression());
    8484
    85       Assert.AreEqual(result, this.interpreter.ExecStack[2]);
    86       Assert.AreEqual(third, this.interpreter.ExecStack[1]);
    87       Assert.AreEqual(first, this.interpreter.ExecStack.Top);
    88       this.TestStackCounts(3);
     85      Assert.AreEqual(result, interpreter.ExecStack[2]);
     86      Assert.AreEqual(third, interpreter.ExecStack[1]);
     87      Assert.AreEqual(first, interpreter.ExecStack.Top);
     88      TestStackCounts(3);
    8989    }
    9090
     
    9797      var result = PushParser.Parse("( EXEC.Y A )");
    9898
    99       this.interpreter.ExecStack.Push(first);
    100       this.Test(new ExecYExpression());
     99      interpreter.ExecStack.Push(first);
     100      Test(new ExecYExpression());
    101101
    102       Assert.AreEqual(first, this.interpreter.ExecStack.Top);
    103       Assert.AreEqual(result, this.interpreter.ExecStack[1]);
    104       this.TestStackCounts(2);
     102      Assert.AreEqual(first, interpreter.ExecStack.Top);
     103      Assert.AreEqual(result, interpreter.ExecStack[1]);
     104      TestStackCounts(2);
    105105    }
    106106
     
    110110    [TestCategory("ExecExpressionTest")]
    111111    public void TestNestedDoRange() {
    112       this.interpreter.Run(
     112      interpreter.Run(
    113113        "( 0 2 EXEC.DO*RANGE ( 1 INTEGER.+ 0 3 EXEC.DO*RANGE ( 1 INTEGER.+ INTEGER.* ) INTEGER.+ )");
    114114
    115       Assert.AreEqual(144, this.interpreter.IntegerStack.Top);
    116       this.TestStackCounts(integerStack: 1);
     115      Assert.AreEqual(144, interpreter.IntegerStack.Top);
     116      TestStackCounts(integerStack: 1);
    117117    }
    118118
     
    122122    [TestCategory("ExecExpressionTest")]
    123123    public void TestNestedDoCount() {
    124       this.interpreter.Run(
     124      interpreter.Run(
    125125        "( 2 EXEC.DO*COUNT ( 1 INTEGER.+ 3 EXEC.DO*COUNT ( 1 INTEGER.+ INTEGER.* ) INTEGER.+ )");
    126126
    127       Assert.AreEqual(144, this.interpreter.IntegerStack.Top);
    128       this.TestStackCounts(integerStack: 1);
     127      Assert.AreEqual(144, interpreter.IntegerStack.Top);
     128      TestStackCounts(integerStack: 1);
    129129    }
    130130
     
    134134    [TestCategory("ExecExpressionTest")]
    135135    public void TestNestedDoTimes() {
    136       this.interpreter.Run("( 3 EXEC.DO*TIMES ( 2 3 EXEC.DO*TIMES ( 2 INTEGER.* ) INTEGER.+ )");
     136      interpreter.Run("( 3 EXEC.DO*TIMES ( 2 3 EXEC.DO*TIMES ( 2 INTEGER.* ) INTEGER.+ )");
    137137
    138       Assert.AreEqual(128, this.interpreter.IntegerStack.Top);
    139       this.TestStackCounts(integerStack: 1);
     138      Assert.AreEqual(128, interpreter.IntegerStack.Top);
     139      TestStackCounts(integerStack: 1);
    140140    }
    141141
     
    153153
    154154    protected override void CheckOtherStacksAreEmpty() {
    155       this.TestStackCounts(null);
     155      TestStackCounts(null);
    156156    }
    157157  }
Note: See TracChangeset for help on using the changeset viewer.