MCPcopy Create free account
hub / github.com/buke/quickjs-go / TestValueGetGoObjectUnavailableHandleStore

Function TestValueGetGoObjectUnavailableHandleStore

value_test.go:1807–1823  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1805}
1806
1807func TestValueGetGoObjectUnavailableHandleStore(t *testing.T) {
1808 rt := NewRuntime()
1809 defer rt.Close()
1810 ctx := rt.NewContext()
1811 defer ctx.Close()
1812
1813 v := ctx.NewObject()
1814 defer v.Free()
1815
1816 backupStore := ctx.handleStore
1817 ctx.handleStore = nil
1818 _, err := v.GetGoObject()
1819 ctx.handleStore = backupStore
1820
1821 require.Error(t, err)
1822 require.Contains(t, err.Error(), "value context is not available")
1823}
1824
1825func TestValueGetGoObjectIdentityRegistryResolution(t *testing.T) {
1826 rt := NewRuntime()

Callers

nothing calls this directly

Calls 8

CloseMethod · 0.95
NewContextMethod · 0.95
CloseMethod · 0.95
NewObjectMethod · 0.95
NewRuntimeFunction · 0.85
GetGoObjectMethod · 0.80
FreeMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected