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

Function TestPrint

errors/error_test.go:25–35  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

23}
24
25func TestPrint(t *testing.T) {
26 pos := position.NewPosition(1, 2, 3, 4)
27
28 Error := errors.NewError("message", pos)
29
30 actual := Error.String()
31
32 expected := "message at line 1"
33
34 assert.DeepEqual(t, expected, actual)
35}
36
37func TestPrintWithotPos(t *testing.T) {
38 Error := errors.NewError("message", nil)

Callers

nothing calls this directly

Calls 3

StringMethod · 0.95
NewPositionFunction · 0.92
NewErrorFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…