Free cookie consent management tool by TermsFeed Policy Generator

source: addons/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/PrintExpressionTests.cs @ 18242

Last change on this file since 18242 was 15289, checked in by pkimmesw, 7 years ago

#2665 Fixed analyzer, fixed Plush encoding + operators, adpated print evaluation according to McPhee

File size: 723 bytes
Line 
1namespace HeuristicLab.Tests.Interpreter.Expressions {
2  using System.Globalization;
3
4  using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions;
5
6  using Microsoft.VisualStudio.TestTools.UnitTesting;
7
8  [TestClass]
9  public class PrintExpressionTests : ExpressionTest {
10
11    [TestMethod]
12    [TestProperty("Time", "Short")]
13    [TestCategory("ExpressionTest")]
14    [TestCategory("PrintExpressionTest")]
15    public void TestPrintFloat() {
16      var value = 29.561570440978656;
17      interpreter.FloatStack.Push(value);
18      interpreter.Run(new FloatPrintExpression());
19
20      Assert.AreEqual(value.ToString("R", CultureInfo.InvariantCulture), interpreter.PrintStack.ToString());
21    }
22  }
23}
Note: See TracBrowser for help on using the repository browser.