Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/02/17 21:17:25 (7 years ago)
Author:
pkimmesw
Message:

#2665 Formatted solution using hl dev settings

File:
1 edited

Legend:

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

    r14834 r14906  
    1 namespace HeuristicLab.Tests.Interpreter.Expressions
    2 {
     1namespace HeuristicLab.Tests.Interpreter.Expressions {
    32  using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions;
    43  using HeuristicLab.Problems.ProgramSynthesis.Push.Stack;
     
    76
    87  [TestClass]
    9   public class IntegerExpressionTests : CommonTests<long>
    10   {
     8  public class IntegerExpressionTests : CommonTests<long> {
    119    protected override string TypeName
    1210    {
     
    2927    [TestCategory("ExpressionTest")]
    3028    [TestCategory("IntegerExpressionTest")]
    31     public void TestAdd()
    32     {
     29    public void TestAdd() {
    3330      this.interpreter.IntegerStack.Push(5, 5);
    3431      this.interpreter.Run(new IntegerAddExpression());
     
    4340    [TestCategory("ExpressionTest")]
    4441    [TestCategory("IntegerExpressionTest")]
    45     public void TestAddWithInsufficientArguments()
    46     {
     42    public void TestAddWithInsufficientArguments() {
    4743      this.TestWithInsufficientArguments("+", 1);
    4844    }
     
    5248    [TestCategory("ExpressionTest")]
    5349    [TestCategory("IntegerExpressionTest")]
    54     public void TestSubtract()
    55     {
     50    public void TestSubtract() {
    5651      this.interpreter.IntegerStack.Push(10, 5);
    5752      this.interpreter.Run(new IntegerSubtractExpression());
     
    6661    [TestCategory("ExpressionTest")]
    6762    [TestCategory("IntegerExpressionTest")]
    68     public void TestSubtractWithInsufficientArguments()
    69     {
     63    public void TestSubtractWithInsufficientArguments() {
    7064      this.TestWithInsufficientArguments("-", 1);
    7165    }
     
    7569    [TestCategory("ExpressionTest")]
    7670    [TestCategory("IntegerExpressionTest")]
    77     public void TestMultiply()
    78     {
     71    public void TestMultiply() {
    7972      this.interpreter.IntegerStack.Push(10, 5);
    8073      this.interpreter.Run(new IntegerMultiplyExpression());
     
    8982    [TestCategory("ExpressionTest")]
    9083    [TestCategory("IntegerExpressionTest")]
    91     public void TestMultiplyWithInsufficientArguments()
    92     {
     84    public void TestMultiplyWithInsufficientArguments() {
    9385      this.TestWithInsufficientArguments("*", 1);
    9486    }
     
    9890    [TestCategory("ExpressionTest")]
    9991    [TestCategory("IntegerExpressionTest")]
    100     public void TestDivide()
    101     {
     92    public void TestDivide() {
    10293      this.interpreter.IntegerStack.Push(10, 5);
    10394      this.interpreter.Run(new IntegerDivideExpression());
     
    112103    [TestCategory("ExpressionTest")]
    113104    [TestCategory("IntegerExpressionTest")]
    114     public void TestDivideWithInsufficientArguments()
    115     {
     105    public void TestDivideWithInsufficientArguments() {
    116106      this.TestWithInsufficientArguments("/", 1);
    117107    }
     
    121111    [TestCategory("ExpressionTest")]
    122112    [TestCategory("IntegerExpressionTest")]
    123     public void TestModulo()
    124     {
     113    public void TestModulo() {
    125114      this.interpreter.IntegerStack.Push(10, 5);
    126115      this.interpreter.Run(new IntegerModuloExpression());
     
    135124    [TestCategory("ExpressionTest")]
    136125    [TestCategory("IntegerExpressionTest")]
    137     public void TestModuloWithInsufficientArguments()
    138     {
     126    public void TestModuloWithInsufficientArguments() {
    139127      this.TestWithInsufficientArguments("%", 1);
    140128    }
     
    144132    [TestCategory("ExpressionTest")]
    145133    [TestCategory("IntegerExpressionTest")]
    146     public void TestMin()
    147     {
     134    public void TestMin() {
    148135      this.interpreter.IntegerStack.Push(10, 5);
    149136      this.interpreter.Run(new IntegerMinExpression());
     
    158145    [TestCategory("ExpressionTest")]
    159146    [TestCategory("IntegerExpressionTest")]
    160     public void TestMinWithInsufficientArguments()
    161     {
     147    public void TestMinWithInsufficientArguments() {
    162148      this.TestWithInsufficientArguments("MIN", 1);
    163149    }
     
    167153    [TestCategory("ExpressionTest")]
    168154    [TestCategory("IntegerExpressionTest")]
    169     public void TestMax()
    170     {
     155    public void TestMax() {
    171156      this.interpreter.IntegerStack.Push(10, 5);
    172157      this.interpreter.Run(new IntegerMaxExpression());
     
    181166    [TestCategory("ExpressionTest")]
    182167    [TestCategory("IntegerExpressionTest")]
    183     public void TestMaxWithInsufficientArguments()
    184     {
     168    public void TestMaxWithInsufficientArguments() {
    185169      this.TestWithInsufficientArguments("MAX", 1);
    186170    }
     
    190174    [TestCategory("ExpressionTest")]
    191175    [TestCategory("IntegerExpressionTest")]
    192     public void TestSmallerThan()
    193     {
     176    public void TestSmallerThan() {
    194177      this.interpreter.IntegerStack.Push(10, 5);
    195178      this.interpreter.Run(new IntegerSmallerThanExpression());
     
    204187    [TestCategory("ExpressionTest")]
    205188    [TestCategory("IntegerExpressionTest")]
    206     public void TestSmallerThanWithInsufficientArguments()
    207     {
     189    public void TestSmallerThanWithInsufficientArguments() {
    208190      this.TestWithInsufficientArguments("<", 1);
    209191    }
     
    213195    [TestCategory("ExpressionTest")]
    214196    [TestCategory("IntegerExpressionTest")]
    215     public void TestGreaterThan()
    216     {
     197    public void TestGreaterThan() {
    217198      this.interpreter.IntegerStack.Push(10, 5);
    218199      this.interpreter.Run(new IntegerGreaterThanExpression());
     
    227208    [TestCategory("ExpressionTest")]
    228209    [TestCategory("IntegerExpressionTest")]
    229     public void TestGreaterThanWithInsufficientArguments()
    230     {
     210    public void TestGreaterThanWithInsufficientArguments() {
    231211      this.TestWithInsufficientArguments(">", 1);
    232212    }
     
    236216    [TestCategory("ExpressionTest")]
    237217    [TestCategory("IntegerExpressionTest")]
    238     public void TestFromBooleanTrue()
    239     {
     218    public void TestFromBooleanTrue() {
    240219      this.interpreter.BooleanStack.Push(true);
    241220      this.interpreter.Run(new IntegerFromBooleanExpression());
     
    250229    [TestCategory("ExpressionTest")]
    251230    [TestCategory("IntegerExpressionTest")]
    252     public void TestFromBooleanWithInsufficientArguments()
    253     {
     231    public void TestFromBooleanWithInsufficientArguments() {
    254232      this.TestWithInsufficientArguments("FROMBOOLEAN");
    255233    }
     
    259237    [TestCategory("ExpressionTest")]
    260238    [TestCategory("IntegerExpressionTest")]
    261     public void TestFromBooleanFalse()
    262     {
     239    public void TestFromBooleanFalse() {
    263240      this.interpreter.BooleanStack.Push(false);
    264241      this.interpreter.Run(new IntegerFromBooleanExpression());
     
    273250    [TestCategory("ExpressionTest")]
    274251    [TestCategory("IntegerExpressionTest")]
    275     public void TestFromFloat()
    276     {
     252    public void TestFromFloat() {
    277253      this.interpreter.FloatStack.Push(1.5);
    278254      this.interpreter.Run(new IntegerFromFloatExpression());
     
    287263    [TestCategory("ExpressionTest")]
    288264    [TestCategory("IntegerExpressionTest")]
    289     public void TestFromFloatWithInsufficientArguments()
    290     {
     265    public void TestFromFloatWithInsufficientArguments() {
    291266      this.TestWithInsufficientArguments("FROMFLOAT");
    292267    }
    293268
    294     protected override long[] GetValues(int count)
    295     {
     269    protected override long[] GetValues(int count) {
    296270      var values = new long[count];
    297271
     
    301275    }
    302276
    303     protected override void CheckOtherStacksAreEmpty()
    304     {
     277    protected override void CheckOtherStacksAreEmpty() {
    305278      this.TestStackCounts(integerStack: null);
    306279    }
Note: See TracChangeset for help on using the changeset viewer.