Widac jakis sens

This commit is contained in:
Michał Derkacz
2011-07-01 14:59:27 +02:00
parent bd504423fe
commit b1b421e54b
11 changed files with 555 additions and 105 deletions

29
glib_test.go Normal file
View File

@@ -0,0 +1,29 @@
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)
}