From 9db8d35a492dce8c96025f42da77109bccacbbba Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 18 Sep 2026 20:35:56 +0200 Subject: [PATCH] Expect a narrowing fix beside the widening one in a struct tag's range error --- struct_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/struct_test.go b/struct_test.go index 89dffb9..fd48f8f 100644 --- a/struct_test.go +++ b/struct_test.go @@ -245,16 +245,16 @@ func TestFakeStructErrors(t *testing.T) { }{}, `"Ada" is not an integer`}, {&struct { A int8 `fake:"{int(0,300)}"` - }{}, `"{int(0,300)}" is not proven within int8; make it int64`}, + }{}, `"{int(0,300)}" is not proven within int8; narrow it to that range, or make the field int64`}, {&struct { A uint `fake:"{int(-1,5)}"` - }{}, `"{int(-1,5)}" is not proven within uint; make it int64`}, + }{}, `"{int(-1,5)}" is not proven within uint; narrow it to that range, or make the field int64`}, {&struct { A float32 `fake:"[\"1\",\"1e39\"]"` - }{}, `"1e39" is not proven within float32; make it float64`}, + }{}, `"1e39" is not proven within float32; narrow it to that range, or make the field float64`}, {&struct { A int32 `fake:"{seq()}"` - }{}, `"{seq()}" is not proven within int32; make it int64`}, + }{}, `"{seq()}" is not proven within int32; narrow it to that range, or make the field int64`}, {&struct { A bool `fake:"{int(0,1)}"` }{}, "prints an integer, not a boolean"},