MCPcopy Create free account
hub / github.com/z7zmey/php-parser / TestTokenPoolGetFromPool

Function TestTokenPoolGetFromPool

scanner/token_pool_test.go:20–34  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

18}
19
20func TestTokenPoolGetFromPool(t *testing.T) {
21 tp := new(scanner.TokenPool)
22
23 expectedToken := &scanner.Token{
24 Value: "test",
25 }
26
27 tp.Put(expectedToken)
28
29 actualToken := tp.Get()
30
31 if !reflect.DeepEqual(expectedToken, actualToken) {
32 t.Errorf("*TokenPool.Put() must return *Token object from pool\n")
33 }
34}

Callers

nothing calls this directly

Calls 2

PutMethod · 0.80
GetMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…