MCPcopy
hub / github.com/pquerna/ffjson / assertTokensEqual

Function assertTokensEqual

fflib/v1/lexer_test.go:40–54  ·  view source on GitHub ↗
(t *testing.T, a []FFTok, b []FFTok)

Source from the content-addressed store, hash-verified

38}
39
40func assertTokensEqual(t *testing.T, a []FFTok, b []FFTok) {
41
42 if len(a) != len(b) {
43 t.Fatalf("Token lists of mixed length: expected=%v found=%v", a, b)
44 return
45 }
46
47 for i, v := range a {
48 if b[i] != v {
49 t.Fatalf("Invalid Token: expected=%d found=%d token=%d",
50 v, b, i)
51 return
52 }
53 }
54}
55
56func scanToTok(ffl *FFLexer, targetTok FFTok) error {
57 _, err := scanToTokCount(ffl, targetTok)

Callers 2

TestBasicLexingFunction · 0.85
TestHelloWorldFunction · 0.85

Calls 1

FatalfMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…