From 0c5b9668203f265d21ed5ce6ec157820510a276e Mon Sep 17 00:00:00 2001 From: Tronje Krop Date: Fri, 19 Dec 2025 09:20:38 +0100 Subject: [PATCH] fix: deep copy pattern for slices to pointers (#134) Signed-off-by: Tronje Krop --- VERSION | 2 +- internal/reflect/random.go | 22 +- test/pattern.go | 17 +- test/pattern_test.go | 468 +++++++++++++++++++++++++++++-------- 4 files changed, 396 insertions(+), 113 deletions(-) diff --git a/VERSION b/VERSION index 1df5b7e..fad9d0a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.46 +0.0.47 diff --git a/internal/reflect/random.go b/internal/reflect/random.go index 2d7b93d..fffe474 100644 --- a/internal/reflect/random.go +++ b/internal/reflect/random.go @@ -84,27 +84,27 @@ func (r *random) newPrimitive(kind reflect.Kind) any { case reflect.Bool: return r.rand.Intn(r.length) != 0 case reflect.Int: - return r.rand.Intn(r.length) + 1 + return r.rand.Intn(2<