Skip to content

Commit 92d42c8

Browse files
dr0icboehme
authored andcommitted
Add test for SimpleRegexTrie
1 parent 76a5ed2 commit 92d42c8

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright 2013 Pascal Christoph, hbz
3+
* Licensed under the Eclipse Public License 1.0 */
4+
package org.culturegraph.mf.util.tries;
5+
6+
import static org.junit.Assert.assertTrue;
7+
8+
import org.junit.Test;
9+
10+
/**
11+
* tests {@link SimpleRegexTrie}
12+
*
13+
* @author Pascal Christoph
14+
*
15+
*/
16+
public final class SimpleRegexTrieTest {
17+
private static final String SCC = "aacbb|a[ab]bb";
18+
private static final String AACBB = "aacbb";
19+
20+
@Test
21+
public void testWithSimpleCharacterClass() {
22+
final SimpleRegexTrie<String> trie = new SimpleRegexTrie<String>();
23+
trie.put(SCC, SCC);
24+
assertTrue(AACBB, trie.get(AACBB).size() == 1);
25+
}
26+
}

0 commit comments

Comments
 (0)