-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbatch_test.go
More file actions
47 lines (33 loc) · 728 Bytes
/
batch_test.go
File metadata and controls
47 lines (33 loc) · 728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package gfx
import "testing"
func TestNewBatch(t *testing.T) {
b := NewBatch(nil, nil)
if b.mat != IM {
t.Fatalf("unexpected matrix")
}
}
func TestBatchClear(t *testing.T) {
b := NewBatch(&TrianglesData{}, nil)
b.Clear()
}
func TestBatchDraw(t *testing.T) {
b := NewBatch(nil, nil)
m := NewImage(32, 32)
b.Draw(NewDrawTarget(m))
}
func TestBatchMakeTriangles(t *testing.T) {
b := NewBatch(nil, nil)
b.MakeTriangles(&TrianglesData{})
}
func TestBatchMakePicture(t *testing.T) {
b := NewBatch(nil, nil)
b.MakePicture(nil)
}
func TestBatchTrianglesDraw(t *testing.T) {
bt := &batchTriangles{
tri: &TrianglesData{},
tmp: MakeTrianglesData(0),
dst: NewBatch(&TrianglesData{}, nil),
}
bt.Draw()
}