diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-04-07 16:31:46 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-04-07 16:37:44 +0900 |
| commit | c61cdc505f05decd940cb2d861241039a49251e3 (patch) | |
| tree | e6f34ad86c7a4d0e98b896cd37d4f77cbcb9ea66 /container/dispatcher_test.go | |
| parent | 062edb3487c1cc116cae78bf77420b65c43517d1 (diff) | |
internal/params: relocate from package container
This does not make sense as part of the public API, so make it internal.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/dispatcher_test.go')
| -rw-r--r-- | container/dispatcher_test.go | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/container/dispatcher_test.go b/container/dispatcher_test.go index b57c53b9..c8a7b492 100644 --- a/container/dispatcher_test.go +++ b/container/dispatcher_test.go @@ -390,7 +390,7 @@ func (k *kstub) isatty(fd int) bool { return expect.Ret.(bool) } -func (k *kstub) receive(key string, e any, fdp *uintptr) (closeFunc func() error, err error) { +func (k *kstub) receive(key string, e any, fdp *int) (closeFunc func() error, err error) { k.Helper() expect := k.Expects("receive") @@ -408,10 +408,17 @@ func (k *kstub) receive(key string, e any, fdp *uintptr) (closeFunc func() error } return nil } + + // avoid changing test cases + var fdpComp *uintptr + if fdp != nil { + fdpComp = new(uintptr(*fdp)) + } + err = expect.Error( stub.CheckArg(k.Stub, "key", key, 0), stub.CheckArgReflect(k.Stub, "e", e, 1), - stub.CheckArgReflect(k.Stub, "fdp", fdp, 2)) + stub.CheckArgReflect(k.Stub, "fdp", fdpComp, 2)) // 3 is unused so stores params if expect.Args[3] != nil { @@ -426,7 +433,7 @@ func (k *kstub) receive(key string, e any, fdp *uintptr) (closeFunc func() error if expect.Args[4] != nil { if v, ok := expect.Args[4].(uintptr); ok && v >= 3 { if fdp != nil { - *fdp = v + *fdp = int(v) } } } |
