mirror of
https://github.com/duanhf2012/origin.git
synced 2026-05-14 03:37:31 +08:00
优化代码
This commit is contained in:
@@ -4,6 +4,28 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestExecMgr(t *testing.T) {
|
||||
|
||||
type Entrance_IntParam struct {
|
||||
BaseExecNode
|
||||
}
|
||||
|
||||
func (em *Entrance_IntParam) GetName() string {
|
||||
return "Entrance_IntParam"
|
||||
}
|
||||
|
||||
func (em *Entrance_IntParam) Exec() (int, error) {
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
func OnRegister(bm *ExecPool) error {
|
||||
bm.Register(&Entrance_IntParam{})
|
||||
return nil
|
||||
}
|
||||
|
||||
func TestExecMgr(t *testing.T) {
|
||||
//
|
||||
var bp Blueprint
|
||||
err := bp.Init("./json/", "./vgf/", OnRegister)
|
||||
if err != nil {
|
||||
t.Fatalf("init failed,err:%v", err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user