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 IntegerVectorExpressionTests : VectorExpressionTests { protected override string TypeName { get { return "INTEGER[]"; } } protected override IPushStack> Stack { get { return interpreter.IntegerVectorStack; } } protected override IPushStack LiteralStack { get { return interpreter.IntegerStack; } } 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 => (long)interpreter.Configuration.ErcOptions.IntegerErcOptions.GetErcValue(interpreter.Random)) .ToArray(); } protected override void CheckOtherStacksAreEmpty() { TestStackCounts(integerVectorStack: null); } } }