Changeset 16194
- Timestamp:
- 09/28/18 15:40:59 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2886_SymRegGrammarEnumeration/Test/TreeHashingTest.cs
r16193 r16194 136 136 int hash1 = ComputeHash(grammar, s1); 137 137 int hash2 = ComputeHash(grammar, s2); 138 139 Console.WriteLine(s1);140 Console.WriteLine(PrintTree(s1));141 Console.WriteLine(grammar.Simplify(null, s1));142 Console.WriteLine(hash1);143 Console.WriteLine();144 Console.WriteLine(s2);145 Console.WriteLine(PrintTree(s2));146 Console.WriteLine(grammar.Simplify(null, s2));147 Console.WriteLine(hash2);148 149 138 150 139 Assert.AreEqual(hash1, hash2); … … 239 228 } 240 229 241 string PrintTree(SymbolList s) {242 var t = grammar.ParseSymbolicExpressionTree(s);243 return HierarchicalFormatter.Format(t.Root.GetSubtree(0).GetSubtree(0));244 }245 246 230 [TestMethod] 247 231 [TestCategory("TreeHashing")] … … 280 264 Console.WriteLine($"\t{simplified}"); 281 265 Console.Write($"\t"); 282 PrintTree(t.Item2);283 266 Console.WriteLine(); 284 267 }
Note: See TracChangeset
for help on using the changeset viewer.