namespace HeuristicLab.Tests.Interpreter.Expressions { using System.Collections.Generic; using System.Linq; using HeuristicLab.Problems.ProgramSynthesis.Push.Stack; using Microsoft.VisualStudio.TestTools.UnitTesting; [TestClass] public class StringVectorExpressionTests : VectorExpressionTests { protected override string TypeName { get { return "STRING[]"; } } protected override IPushStack> Stack { get { return interpreter.StringVectorStack; } } protected override IPushStack LiteralStack { get { return interpreter.StringStack; } } 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.StringErcOptions.GetErcValue(interpreter.Random)) .ToArray(); } protected override void CheckOtherStacksAreEmpty() { TestStackCounts(stringVectorStack: null); } } }