MCPcopy Create free account
hub / github.com/deuill/go-php / TestValuePtr

Function TestValuePtr

engine/value_test.go:534–546  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

532}
533
534func TestValuePtr(t *testing.T) {
535 c, _ := e.NewContext()
536 defer c.Destroy()
537
538 val, err := NewValue(42)
539 if err != nil {
540 t.Fatalf("NewValue('%v'): %s", 42, err)
541 }
542
543 if val.Ptr() == nil {
544 t.Errorf("Value.Ptr('%v'): Unable to create pointer from value")
545 }
546}
547
548func TestValueDestroy(t *testing.T) {
549 c, _ := e.NewContext()

Callers

nothing calls this directly

Calls 4

DestroyMethod · 0.95
PtrMethod · 0.95
NewValueFunction · 0.85
NewContextMethod · 0.80

Tested by

no test coverage detected