Changeset 6918 for trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/Util.cs
- Timestamp:
- 10/13/11 15:31:27 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/Util.cs
r6911 r6918 137 137 Assert.IsTrue(otherRootNode.Grammar.GetMinimumSubtreeCount(invoke) == arity); 138 138 Assert.IsTrue(otherRootNode.Grammar.GetMaximumSubtreeCount(invoke) == arity); 139 Assert.IsFalse(otherRootNode.Grammar.IsAllowedChildSymbol(invoke, invoke)); 140 for (int i = 0; i < arity; i++) { 141 Assert.IsFalse(otherRootNode.Grammar.IsAllowedChildSymbol(invoke, invoke, i)); 142 } 139 143 } 140 144 } … … 161 165 162 166 foreach (var symbol in grammar.ModifyableSymbols) { 163 //check if ever symbol has at least on 167 //check if ever symbol has at least one allowed child 164 168 for (int i = 0; i < grammar.GetMaximumSubtreeCount(symbol); i++) 165 169 Assert.IsTrue(grammar.GetAllowedChildSymbols(symbol, i).Any());
Note: See TracChangeset
for help on using the changeset viewer.