From cad3714664215c21393567419aef13f93eea9546 Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Wed, 24 Dec 2025 20:25:46 -0600 Subject: [PATCH] add base and bitsize to bad tests --- internal/processor/uint-parse_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/internal/processor/uint-parse_test.go b/internal/processor/uint-parse_test.go index b78805f..8e60df3 100644 --- a/internal/processor/uint-parse_test.go +++ b/internal/processor/uint-parse_test.go @@ -166,18 +166,31 @@ func TestBadUintParse(t *testing.T) { processor processor.Processor name string payload any + base int + bitSize int errorString string }{ { name: "non-string input", payload: []byte{0x01}, + base: 10, + bitSize: 64, errorString: "uint.parse processor only accepts a string", }, { name: "not uint string", payload: "-1234", + base: 10, + bitSize: 64, errorString: "strconv.ParseUint: parsing \"-1234\": invalid syntax", }, + { + name: "bit overflow", + payload: "123456789012345678901234567", + base: 10, + bitSize: 32, + errorString: "strconv.ParseUint: parsing \"123456789012345678901234567\": value out of range", + }, } for _, test := range tests {