Exemplo n.º 1
0
func TestHello(t *testing.T) {
	c := simplelib.NewSimpleClass()
	s := c.Hello()
	if s != "world" {
		t.Error("unexpected value: ", s)
	}
}
Exemplo n.º 2
0
func TestHelloBytes(t *testing.T) {
	c := simplelib.NewSimpleClass()
	v := simplelib.NewByteVector()
	c.HelloBytes(v)
	c.HelloBytes(v)
	if v.Size() != 10 {
		t.Error("incorrect size: ", v)
	}
}
Exemplo n.º 3
0
func TestHelloString(t *testing.T) {
	c := simplelib.NewSimpleClass()
	v := simplelib.NewStringVector()
	c.HelloString(v)
	c.HelloString(v)
	if v.Size() != 2 {
		t.Error("incorrect size: ", v)
	}
}