Optimize x11 screen capture buffer handling

This commit is contained in:
Atsushi Watanabe
2020-02-16 18:27:30 +09:00
parent 29d5a80f4f
commit a2d6c6bb58
3 changed files with 76 additions and 9 deletions

View File

@@ -0,0 +1,17 @@
package screen
import (
"testing"
)
func TestAlign64(t *testing.T) {
if ret := cAlign64(0x00010008); ret != 0x00010008 {
t.Errorf("Wrong alignment, expected %x, got %x", 0x00010008, ret)
}
if ret := cAlign64(0x00010006); ret != 0x00010008 {
t.Errorf("Wrong alignment, expected %x, got %x", 0x00010008, ret)
}
if ret := cAlign64(0x00010009); ret != 0x00010010 {
t.Errorf("Wrong alignment, expected %x, got %x", 0x00010010, ret)
}
}