MCPcopy Index your code
hub / github.com/google/codesearch / TestNstateEnc

Function TestNstateEnc

regexp/regexp_test.go:24–40  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

22}
23
24func TestNstateEnc(t *testing.T) {
25 var n1, n2 nstate
26 n1.q.Init(10)
27 n2.q.Init(10)
28 for _, tt := range nstateTests {
29 n1.q.Reset()
30 n1.partial = tt.partial
31 for _, id := range tt.q {
32 n1.q.Add(id)
33 }
34 enc := n1.enc()
35 n2.dec(enc)
36 if n2.partial != n1.partial || !reflect.DeepEqual(n1.q.Dense(), n2.q.Dense()) {
37 t.Errorf("%v.enc.dec = %v", &n1, &n2)
38 }
39 }
40}
41
42var matchTests = []struct {
43 re string

Callers

nothing calls this directly

Calls 6

encMethod · 0.95
decMethod · 0.95
InitMethod · 0.80
ResetMethod · 0.80
DenseMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…