Esempio n. 1
0
func main() {
	fmt.Println("Hello!")
	str := ping.Ping("Hi there!")
	fmt.Println("Response from Ping Server := ", str)
	fmt.Println("Calling Base Function!")
	var base inheritdemo.Baser
	str1, _ := base.DoIt("Hello")
	fmt.Println(" Response from Base : = ", str1)
	var derived inheritdemo.Derived
	str2, _ := derived.DoIt("Hello")
	fmt.Println(" Response from Derived : = ", str2)
}
Esempio n. 2
0
func TestPing(t *testing.T) {
	str := ping.Ping("Hi There")
	if str != "Hi There" {
		t.Error("Test Failed : Returned string didn't match!")
	}
}