From e7a537695e377de3321ce890d54d40cfda127f61 Mon Sep 17 00:00:00 2001 From: yassinebenaid Date: Thu, 18 Jul 2024 21:05:16 +0100 Subject: [PATCH] added a test case for buffered channels --- dumper_test.go | 4 ++++ testdata/primitives.txt | 1 + 2 files changed, 5 insertions(+) diff --git a/dumper_test.go b/dumper_test.go index 12b9270..9f50d48 100644 --- a/dumper_test.go +++ b/dumper_test.go @@ -197,6 +197,8 @@ func TestCanDumpPrimitives(t *testing.T) { PtrTypedChan1 *Chan1Type PtrTypedChan2 *Chan2Type + BufferedChan chan struct{} + UnsafePointer1 unsafe.Pointer UnsafePointer2 *unsafe.Pointer } @@ -245,6 +247,8 @@ func TestCanDumpPrimitives(t *testing.T) { Nil: nil, UnsafePointer1: nil, + + BufferedChan: make(chan struct{}, 255), } node.IntPtr = &node.Int diff --git a/testdata/primitives.txt b/testdata/primitives.txt index 5a04858..964e71f 100644 --- a/testdata/primitives.txt +++ b/testdata/primitives.txt @@ -118,6 +118,7 @@ godump_test.Node { PtrTypedChan: &godump_test.ChanType, PtrTypedChan1: &godump_test.Chan1Type, PtrTypedChan2: &godump_test.Chan2Type, + BufferedChan: chan struct {}<255>, UnsafePointer1: unsafe.Pointer(0x0), UnsafePointer2: &unsafe.Pointer(0x7b), } \ No newline at end of file