Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11498 for trunk/sources


Ignore:
Timestamp:
10/24/14 16:52:01 (10 years ago)
Author:
mkommend
Message:

#2268: Adapted unit test (cloning and tree creation) to work with the new empty expression tree grammar.

Location:
trunk/sources/HeuristicLab.Tests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/CloningConstructorTest.cs

    r11171 r11498  
    4747        //test only types contained in HL plugin assemblies
    4848        if (!PluginLoader.Assemblies.Contains(deepCloneableType.Assembly)) continue;
     49        if (deepCloneableType.IsSealed) continue;
    4950
    5051        bool found = false;
  • trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/DeepCloneableCloningTest.cs

    r11171 r11498  
    2525using HeuristicLab.Common;
    2626using HeuristicLab.Core;
     27using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2728using HeuristicLab.Optimization;
    2829using HeuristicLab.Persistence.Default.Xml;
     
    5455      excludedTypes.Add(typeof(HeuristicLab.Problems.DataAnalysis.ClassificationEnsembleSolution));
    5556      excludedTypes.Add(typeof(HeuristicLab.Problems.DataAnalysis.RegressionEnsembleSolution));
     57      excludedTypes.Add(typeof(SymbolicExpressionGrammar).Assembly.GetType("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.EmptySymbolicExpressionTreeGrammar"));
    5658
    5759      foreach (var symbolType in ApplicationManager.Manager.GetTypes(typeof(HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbol)))
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/Util.cs

    r11171 r11498  
    147147
    148148      foreach (var subtree in tree.Root.Subtrees) {
    149         Assert.AreNotSame(subtree.Grammar, tree.Root.Grammar);
     149        if (tree.Root.Grammar.GetType().Name != "EmptySymbolicExpressionTreeGrammar")
     150          Assert.AreNotSame(subtree.Grammar, tree.Root.Grammar);
    150151        IsValid(subtree.Grammar);
    151152      }
Note: See TracChangeset for help on using the changeset viewer.