Changeset 6911 for trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/Util.cs
- Timestamp:
- 10/12/11 17:06:14 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/Util.cs
r6866 r6911 154 154 Assert.IsTrue(grammar.Symbols.Count() == grammar.Symbols.Distinct().Count()); 155 155 foreach (ISymbol symbol in grammar.AllowedSymbols) { 156 Assert.IsTrue(grammar.GetMinimumSubtreeCount(symbol) <= grammar.GetMaximumExpressionLength(symbol));157 156 Assert.IsTrue(grammar.GetAllowedChildSymbols(symbol).Count() == grammar.GetAllowedChildSymbols(symbol).Distinct().Count()); 158 157 for (int i = 0; i < grammar.GetMaximumSubtreeCount(symbol); i++) { … … 165 164 for (int i = 0; i < grammar.GetMaximumSubtreeCount(symbol); i++) 166 165 Assert.IsTrue(grammar.GetAllowedChildSymbols(symbol, i).Any()); 167 168 //if (symbol is ProgramRootSymbol) continue;169 ////check if symbol is allowed as at least one child symbol170 //bool result = false;171 //foreach (var parentSymbol in grammar.Symbols) {172 // if (result) break;173 // for (int i = 0; i < grammar.GetMaximumSubtreeCount(parentSymbol); i++)174 // result = result || grammar.IsAllowedChildSymbol(parentSymbol, symbol, i);175 //}176 //Assert.IsTrue(result);177 178 166 } 179 167 }
Note: See TracChangeset
for help on using the changeset viewer.