MCPcopy Index your code
hub / github.com/TheAlgorithms/Go / TestTrieInsert

Function TestTrieInsert

structure/trie/trie_test.go:7–25  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

5)
6
7func TestTrieInsert(t *testing.T) {
8 n := NewNode()
9
10 insertWords := []string{
11 "nikola",
12 "tesla",
13 }
14
15 checkWords := map[string]bool{
16 "thomas": false,
17 "edison": false,
18 "nikola": true,
19 }
20
21 n.Insert(insertWords...)
22 n.verify(t, checkWords)
23 n.verifySizeCapa(t, 2, 12)
24
25}
26
27func TestTrieInsert_substrings(t *testing.T) {
28 n := NewNode()

Callers

nothing calls this directly

Calls 4

InsertMethod · 0.95
verifyMethod · 0.95
verifySizeCapaMethod · 0.95
NewNodeFunction · 0.70

Tested by

no test coverage detected