- Timestamp:
- 03/03/10 03:14:37 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Algorithms.SGA/3.3/Tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.SGA/3.3/Tests
- Property svn:ignore
-
old new 1 1 bin 2 2 obj 3 *.user
-
- Property svn:ignore
-
trunk/sources/HeuristicLab.Algorithms.SGA/3.3/Tests/UnitTest.cs
r2884 r2916 1 using System; 2 using System.Diagnostics; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System; 3 23 using System.Threading; 4 using HeuristicLab. Core;24 using HeuristicLab.Optimization; 5 25 using HeuristicLab.Persistence.Default.Xml; 6 26 using Microsoft.VisualStudio.TestTools.UnitTesting; … … 58 78 59 79 [TestMethod] 60 [DeploymentItem(@"SGA Engine.hl")]80 [DeploymentItem(@"SGA.hl")] 61 81 public void SGAPerformanceTest() { 62 I Engine engine = (IEngine)XmlParser.Deserialize("SGAEngine.hl");63 engine.Stopped += new EventHandler(engine_Stopped);64 engine.Prepare();65 engine.Start();82 IAlgorithm sga = (IAlgorithm)XmlParser.Deserialize("SGA.hl"); 83 sga.Stopped += new EventHandler(sga_Stopped); 84 sga.Prepare(); 85 sga.Start(); 66 86 trigger.WaitOne(); 67 TestContext.WriteLine("Runtime: {0}", engine.ExecutionTime.ToString());87 TestContext.WriteLine("Runtime: {0}", sga.ExecutionTime.ToString()); 68 88 } 69 89 70 private void engine_Stopped(object sender, EventArgs e) {90 private void sga_Stopped(object sender, EventArgs e) { 71 91 trigger.Set(); 72 92 }
Note: See TracChangeset
for help on using the changeset viewer.