Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/09/18 15:32:44 (7 years ago)
Author:
lkammere
Message:

#2886: Refactor grammar enumeration alg.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2886_SymRegGrammarEnumeration/Test/TreeHashingTest.cs

    r15725 r15746  
    9494    }
    9595
     96    [TestMethod]
     97    [TestCategory("TreeHashing")]
     98    public void NonterminalHashing() {
     99      SymbolString s1 = new SymbolString(new Symbol[] { varA, varA, grammar.Expr, grammar.Addition, grammar.Addition });
     100      SymbolString s2 = new SymbolString(new Symbol[] { varA, grammar.Expr, grammar.Addition });
     101
     102      int hash1 = grammar.CalcHashCode(s1);
     103      int hash2 = grammar.CalcHashCode(s2);
     104
     105      Assert.AreEqual(hash1, hash2);
     106    }
     107
    96108
    97109    #region parser
Note: See TracChangeset for help on using the changeset viewer.