using System.Collections.Generic; using System.Linq; namespace HeuristicLab.Tests.Interpreter.Expressions { using HeuristicLab.Problems.ProgramSynthesis.Push.Stack; using Microsoft.VisualStudio.TestTools.UnitTesting; [TestClass] public class FloatVectorExpressionTests : VectorExpressionTests { protected override string TypeName { get { return "FLOAT[]"; } } protected override IPushStack> Stack { get { return interpreter.FloatVectorStack; } } protected override IPushStack LiteralStack { get { return interpreter.FloatStack; } } protected override IReadOnlyList[] GetValues(int count) { return Enumerable .Range(0, count) .Select(x => GetLiterals(interpreter.Configuration.MaxVectorLength / 2 - 1)) .ToArray(); } protected override IReadOnlyList GetLiterals(int count) { return Enumerable .Range(0, count) .Select(x => interpreter.Configuration.ErcOptions.FloatErcOptions.GetErcValue(interpreter.Random)) .ToArray(); } protected override void CheckOtherStacksAreEmpty() { TestStackCounts(floatVectorStack: null); } } }