xx: remove old tests
This commit is contained in:
parent
573f042f39
commit
e64c06c964
1 changed files with 0 additions and 45 deletions
45
xx_test.go
45
xx_test.go
|
|
@ -1,45 +0,0 @@
|
|||
package xx_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"unsafe"
|
||||
|
||||
"git.brut.systems/judah/xx"
|
||||
"git.brut.systems/judah/xx/mem"
|
||||
)
|
||||
|
||||
func TestNew(t *testing.T) {
|
||||
a := xx.New(uint32(1024))
|
||||
if *a != 1024 {
|
||||
t.Fail()
|
||||
}
|
||||
|
||||
if unsafe.Sizeof(*a) != mem.Sizeof[uint32]() {
|
||||
t.Fail()
|
||||
}
|
||||
|
||||
b := xx.New(struct{ x, y, z float32 }{10, 20, 30})
|
||||
if b.x != 10 {
|
||||
t.Fail()
|
||||
}
|
||||
if b.y != 20 {
|
||||
t.Fail()
|
||||
}
|
||||
if b.z != 30 {
|
||||
t.Fail()
|
||||
}
|
||||
|
||||
c := xx.New(b)
|
||||
if c == &b {
|
||||
t.Fail()
|
||||
}
|
||||
if (*c).x != 10 {
|
||||
t.Fail()
|
||||
}
|
||||
if (*c).y != 20 {
|
||||
t.Fail()
|
||||
}
|
||||
if (*c).z != 30 {
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue