示例#1
0
func TestHello(t *testing.T) {
	c := simplelib.NewSimpleClass()
	s := c.Hello()
	if s != "world" {
		t.Error("unexpected value: ", s)
	}
}
示例#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)
	}
}
示例#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)
	}
}