Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/10/10 11:26:26 (14 years ago)
Author:
gkronber
Message:

Added test classes for crossover and subroutine creater. #290 (Implement ADFs)

Location:
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3.Tests.csproj

    r3294 r3297  
    3939  </ItemGroup>
    4040  <ItemGroup>
     41    <Compile Include="SubroutineCreaterTest.cs" />
     42    <Compile Include="SubtreeCrossoverTest.cs" />
    4143    <Compile Include="Properties\AssemblyInfo.cs" />
    4244    <Compile Include="ProbabilisticTreeCreaterTest.cs" />
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ProbabilisticTreeCreaterTest.cs

    r3294 r3297  
    66using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    77using HeuristicLab.Random;
     8using System.Diagnostics;
    89
    910namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
     
    1819        randomTrees.Add(ProbabilisticTreeCreator.Create(random, grammar, 100, 10));
    1920      }
     21      foreach (var tree in randomTrees)
     22        Assert.IsTrue(grammar.IsValidExpression(tree));
    2023    }
    2124
     
    7780
    7881    [TestMethod()]
    79     public void SizeDistributionTest() {
     82    public void ProbabilisticTreeCreaterSizeDistributionTest() {
    8083      int[] histogram = new int[105 / 5];
    8184      for (int i = 0; i < randomTrees.Count; i++) {
     
    9295
    9396    [TestMethod()]
    94     public void FunctionDistributionTest() {
     97    public void ProbabilisticTreeCreaterFunctionDistributionTest() {
    9598      Dictionary<Symbol, int> occurances = new Dictionary<Symbol, int>();
    9699      double n = 0.0;
     
    115118
    116119    [TestMethod()]
    117     public void NumberOfSubTreesDistributionTest() {
     120    public void ProbabilisticTreeCreaterNumberOfSubTreesDistributionTest() {
    118121      Dictionary<int, int> occurances = new Dictionary<int, int>();
    119122      double n = 0.0;
     
    137140
    138141    [TestMethod()]
    139     public void TerminalDistributionTest() {
     142    public void ProbabilisticTreeCreaterTerminalDistributionTest() {
    140143      Dictionary<Symbol, int> occurances = new Dictionary<Symbol, int>();
    141144      double n = 0.0;
Note: See TracChangeset for help on using the changeset viewer.