package model import "testing" func TestPeople_GetAge(t *testing.T) { //接口不能实例化,只能对接口的结构体实例化 peo := &People{"derek"} allrun(peo) //derek在跑步 //多态,条件不同结果不同 a := &Animal{"小狗"} allrun(a) //小狗在跑步 }