buf2d/buffer_sub_test.go

17 lines
214 B
Go
Raw Normal View History

2020-10-01 13:14:36 +02:00
package buf2d
import (
"fmt"
"testing"
)
func TestSub(t *testing.T) {
b := NewBuffer(10, 10)
s := b.Sub(1, 1, b.Width()-1, b.Height()-1)
b.Set(5, 5, 'a')
s.Set(5, 5, 'b')
fmt.Println(b)
fmt.Println(s)
}