Changeset 14834 for branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/NameExpressionTests.cs
- Timestamp:
- 04/10/17 00:27:31 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/NameExpressionTests.cs
r14727 r14834 1 namespace HeuristicLab.Tests.Interpreter.Expressions 2 { 1 namespace HeuristicLab.Tests.Interpreter.Expressions { 3 2 using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions; 4 3 using HeuristicLab.Problems.ProgramSynthesis.Push.Generators; … … 8 7 9 8 [TestClass] 10 public class NameExpressionTests : CommonTests<string> 11 { 9 public class NameExpressionTests : CommonTests<string> { 12 10 protected override string TypeName 13 11 { … … 18 16 } 19 17 20 protected override I Stack<string> Stack18 protected override IPushStack<string> Stack 21 19 { 22 20 get … … 30 28 [TestCategory("ExpressionTest")] 31 29 [TestCategory("NameExpressionTest")] 32 public void TestRand() 33 {30 public void TestRand() { 31 this.interpreter.Configuration.ErcOptions.NameErcOptions.IsEnabled = true; 34 32 this.interpreter.Run(new NameRandExpression()); 35 33 … … 43 41 [TestCategory("ExpressionTest")] 44 42 [TestCategory("NameExpressionTest")] 45 public void TestRandomBound() 46 { 43 public void TestRandomBound() { 47 44 this.interpreter.CustomExpressions.Add("c1", new CodeNoopExpression()); 48 45 this.interpreter.CustomExpressions.Add("c2", new CodeNoopExpression()); … … 60 57 [TestCategory("ExpressionTest")] 61 58 [TestCategory("NameExpressionTest")] 62 public void TestRandomBoundWithInsufficientArguments() 63 { 59 public void TestRandomBoundWithInsufficientArguments() { 64 60 this.TestWithInsufficientArguments("RANDBOUNDNAME"); 65 61 } … … 69 65 [TestCategory("ExpressionTest")] 70 66 [TestCategory("NameExpressionTest")] 71 public void TestQuote() 72 { 67 public void TestQuote() { 73 68 this.interpreter.Run(new NameQuoteExpression()); 74 69 … … 78 73 } 79 74 80 protected override string[] GetValues(int count) 81 { 82 var ng = new NameGenerator(); 75 protected override string[] GetValues(int count) { 76 var ng = new StringGenerator(); 83 77 var values = new string[count]; 84 78 … … 88 82 } 89 83 90 protected override void CheckOtherStacksAreEmpty() 91 { 84 protected override void CheckOtherStacksAreEmpty() { 92 85 this.TestStackCounts(nameStack: null); 93 86 }
Note: See TracChangeset
for help on using the changeset viewer.