From 2a40fa561c20dd6423d3c49a149b6fe41b1e9b2d Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Tue, 17 Mar 2026 19:33:41 -0500 Subject: [PATCH] add test for multiple return values --- internal/processor/test/processor_test.go | 4 ++++ internal/processor/test/struct-method-get_test.go | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/internal/processor/test/processor_test.go b/internal/processor/test/processor_test.go index 42964a0..1fc0d35 100644 --- a/internal/processor/test/processor_test.go +++ b/internal/processor/test/processor_test.go @@ -44,6 +44,10 @@ func (t TestStruct) GetIntSlice() []int { func (t TestStruct) Void() {} +func (t TestStruct) MultipleReturnValues() (string, int) { + return t.String, t.Int +} + type TestProcessor struct { } diff --git a/internal/processor/test/struct-method-get_test.go b/internal/processor/test/struct-method-get_test.go index 8643482..b2f7fd7 100644 --- a/internal/processor/test/struct-method-get_test.go +++ b/internal/processor/test/struct-method-get_test.go @@ -106,8 +106,15 @@ func TestGoodStructMethodGet(t *testing.T) { payload: TestStruct{IntSlice: []int{1, 2, 3}}, expected: []int{1, 2, 3}, }, + { + name: "multiple return values", + params: map[string]any{ + "name": "MultipleReturnValues", + }, + payload: TestStruct{String: "hello", Int: 42}, + expected: []any{"hello", 42}, + }, } - for _, test := range tests { t.Run(test.name, func(t *testing.T) { registration, ok := processor.ProcessorRegistry["struct.method.get"]