mirror of
https://github.com/impact-eintr/netstack.git
synced 2025-10-18 18:54:30 +08:00
tuntap test
This commit is contained in:
15
tcpip/buffer/view_test.go
Normal file
15
tcpip/buffer/view_test.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package buffer
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestBaseView(t *testing.T) {
|
||||
buffer1 := []byte("hello world")
|
||||
buffer2 := []byte("test test test")
|
||||
bv1 := NewViewFromBytes(buffer1)
|
||||
bv2 := NewViewFromBytes(buffer2)
|
||||
views := NewVectorisedView(2, []View{bv1, bv2})
|
||||
fmt.Println(string(views.ToView()))
|
||||
}
|
Reference in New Issue
Block a user