Files
ziutek-glib/glib_test.go
Michał Derkacz b1b421e54b Widac jakis sens
2011-07-01 14:59:27 +02:00

30 lines
552 B
Go

package glib
import (
"testing"
)
func TestValue(t *testing.T) {
v1 := uint64(0xdeadbeaf)
a := ValueOf(v1)
b := NewValueInit(TYPE_UINT64)
a.Copy(b)
t.Logf("a = %s(%s), b = %s(%s)", a.Type(), a, b.Type(), b)
if b.Get().(uint64) != v1 {
t.Error("TYPE_UINT64")
}
v2 := -1
a = ValueOf(v2)
b = NewValueInit(TYPE_INT)
a.Copy(b)
t.Logf("a = %s(%s), b = %s(%s)", a.Type(), a, b.Type(), b)
if b.Get() != v2 {
t.Error("TYPE_INT")
}
}
func TestSignal(t *testing.T) {
s := NewSignal("bla", TYPE_NONE, TYPE_GO_INT)
t.Logf("Signal: %s", s)
}