- Timestamp:
- 03/23/10 02:14:26 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/Tests/UnitTest.cs
r3196 r3198 80 80 81 81 [TestMethod] 82 [DeploymentItem(@" SGA.hl")]83 public void SGAPerformanceTest() {82 [DeploymentItem(@"GeneticAlgorithm.hl")] 83 public void GeneticAlgorithmPerformanceTest() { 84 84 ex = null; 85 IAlgorithm sga = (IAlgorithm)XmlParser.Deserialize("SGA.hl");86 sga.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(sga_ExceptionOccurred);87 sga.Stopped += new EventHandler(sga_Stopped);88 sga.Prepare();89 sga.Start();85 IAlgorithm ga = (IAlgorithm)XmlParser.Deserialize("GeneticAlgorithm.hl"); 86 ga.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(ga_ExceptionOccurred); 87 ga.Stopped += new EventHandler(ga_Stopped); 88 ga.Prepare(); 89 ga.Start(); 90 90 trigger.WaitOne(); 91 TestContext.WriteLine("Runtime: {0}", sga.ExecutionTime.ToString());91 TestContext.WriteLine("Runtime: {0}", ga.ExecutionTime.ToString()); 92 92 if (ex != null) throw ex; 93 93 } 94 94 95 private void sga_ExceptionOccurred(object sender, EventArgs<Exception> e) {95 private void ga_ExceptionOccurred(object sender, EventArgs<Exception> e) { 96 96 ex = e.Value; 97 97 } 98 98 99 private void sga_Stopped(object sender, EventArgs e) {99 private void ga_Stopped(object sender, EventArgs e) { 100 100 trigger.Set(); 101 101 }
Note: See TracChangeset
for help on using the changeset viewer.