Changeset 15273 for branches/PushGP/HeuristicLab.PushGP/FeatureTests
- Timestamp:
- 07/19/17 12:55:58 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP/FeatureTests/Program.cs
r15189 r15273 52 52 //TestExpressionDependencies(); 53 53 //TestSplitLogic(); 54 TestStringBuilder(); 54 //TestStringBuilder(); 55 TestRandomReset(); 55 56 56 57 Console.WriteLine("\nPress any key to continue..."); … … 67 68 // false 68 69 var equal = ReferenceEquals(s1, s2); 70 } 71 72 private static void TestRandomReset() { 73 var random = new MersenneTwister(1000); 74 75 var x = random.Next(); 76 random.Reset(); 77 var y = random.Next(); 78 79 if (x != y) { 80 throw new InvalidOperationException(); 81 } 69 82 } 70 83 … … 422 435 for (var i = 0; i < 60000000; i++) { 423 436 interpreter.Run(program); 424 interpreter.Clear ();437 interpreter.ClearStacks(); 425 438 } 426 439 sw.Stop(); … … 442 455 for (var j = 0; j < amount; j++) { 443 456 interpreter.Run(program); 444 interpreter.Clear ();457 interpreter.ClearStacks(); 445 458 } 446 459 } … … 552 565 for (var i = 0; i < iterations; i++) { 553 566 var interpreter = new PushInterpreter(); 554 interpreter.Clear ();567 interpreter.ClearStacks(); 555 568 } 556 569 sw.Stop(); … … 562 575 for (var i = 0; i < iterations; i++) { 563 576 using (var interpreter = pool.Create()) { 564 interpreter.Clear ();577 interpreter.ClearStacks(); 565 578 } 566 579 } … … 597 610 public int Age { get; set; } 598 611 612 public void Init() { } 613 599 614 public void Reset() { 600 615 Age = default(int);
Note: See TracChangeset
for help on using the changeset viewer.