MCPcopy Create free account
hub / github.com/codechenx/FastTableViewer / Test_createNewBuffer

Function Test_createNewBuffer

buffer_test.go:12–30  ·  view source on GitHub ↗

======================================== Buffer Creation Tests ========================================

(t *testing.T)

Source from the content-addressed store, hash-verified

10// ========================================
11
12func Test_createNewBuffer(t *testing.T) {
13 tests := []struct {
14 name string
15 }{
16 {"Create empty buffer"},
17 }
18 for _, tt := range tests {
19 t.Run(tt.name, func(t *testing.T) {
20 buf := createNewBuffer()
21 if buf == nil {
22 t.Error("createNewBuffer() returned nil")
23 return
24 }
25 if buf.rowLen != 0 || buf.colLen != 0 {
26 t.Error("New buffer should be empty")
27 }
28 })
29 }
30}
31
32func Test_createNewBufferWithData(t *testing.T) {
33 type args struct {

Callers

nothing calls this directly

Calls 1

createNewBufferFunction · 0.85

Tested by

no test coverage detected