package test import ( "fmt" "testing" "legu.airobot/busi/friend" "legu.airobot/lib" ) func TestAction(t *testing.T) { aip := lib.AIParam{} ai, _ := lib.NewAI(aip) // 创建场景 scene := lib.NewScene(ai, lib.SceneParam{ Name: "场景1", Desc: "好友", }) //为场景选择caller scene.AddCaller(&friend.FriendRecommend{}) //加机器人 // ai.AddRobot(scene) //运行机器人 // for _, v := range ai.GetRobots("场景1") { // v.Start() // } } func TestA(t *testing.T) { q := lib.NewQueue[int]() q.Add(1) q.Add(2) // list := q.List() for { i, err := q.Pop() if err != nil { t.Error(err) return } fmt.Println(i) } }