Changeset 9846 for branches/HeuristicLab.Problems.GPDL/Test
- Timestamp:
- 08/05/13 11:37:13 (11 years ago)
- Location:
- branches/HeuristicLab.Problems.GPDL/Test
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.GPDL/Test/Test.csproj
r9844 r9846 57 57 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath> 58 58 <Private>True</Private> 59 </Reference> 60 <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 61 <SpecificVersion>False</SpecificVersion> 62 <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath> 59 63 </Reference> 60 64 <Reference Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4"> -
branches/HeuristicLab.Problems.GPDL/Test/TestGpdlExamples.cs
r9843 r9846 24 24 using System.Linq; 25 25 using System.Text; 26 using System.Threading; 27 using HeuristicLab.Algorithms.GeneticAlgorithm; 26 28 using HeuristicLab.Problems.GPDL; 27 29 using HeuristicLab.Problems.GPDL.Views; 30 using HeuristicLab.SequentialEngine; 28 31 using Microsoft.VisualStudio.TestTools.UnitTesting; 29 32 … … 39 42 parser.Parse(); 40 43 Assert.IsNotNull(parser.problem); 44 45 // test: run one generation 46 var ga = new GeneticAlgorithm(); 47 ga.Engine = new SequentialEngine(); 48 ga.PopulationSize.Value = 100; 49 ga.MaximumGenerations.Value = 1; 50 ga.Problem = parser.problem; 51 52 var wh = new AutoResetEvent(false); 53 Exception e = null; 54 ga.ExceptionOccurred += (sender, args) => { 55 e = args.Value; 56 wh.Set(); 57 }; 58 ga.Stopped += (sender, args) => { wh.Set(); }; 59 ga.Start(); 60 wh.WaitOne(); 61 if (e != null) Assert.Fail(e.Message, e); 41 62 } 42 63 }
Note: See TracChangeset
for help on using the changeset viewer.