Skip to content

Commit

Permalink
added a test case for buffered channels
Browse files Browse the repository at this point in the history
  • Loading branch information
yassinebenaid committed Jul 18, 2024
1 parent 8d9582f commit e7a5376
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dumper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ func TestCanDumpPrimitives(t *testing.T) {
PtrTypedChan1 *Chan1Type
PtrTypedChan2 *Chan2Type

BufferedChan chan struct{}

UnsafePointer1 unsafe.Pointer
UnsafePointer2 *unsafe.Pointer
}
Expand Down Expand Up @@ -245,6 +247,8 @@ func TestCanDumpPrimitives(t *testing.T) {
Nil: nil,

UnsafePointer1: nil,

BufferedChan: make(chan struct{}, 255),
}

node.IntPtr = &node.Int
Expand Down
1 change: 1 addition & 0 deletions testdata/primitives.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}

0 comments on commit e7a5376

Please sign in to comment.