sqlite的api,便于内部使用
fix
liuxiaolong
2021-05-14 dccc4ad12f01ff31e58c803e6f25c130e240b6f1
api_test.go
@@ -45,6 +45,7 @@
   ret := Call("add", "hello", "world")
   fmt.Println("NewUUID:",PseudoUuid())
   fmt.Println(ret)
}
@@ -114,8 +115,18 @@
}
func TestMangosReqClient(t *testing.T){
type Point struct {
   X float64 `json:"x"`
   Y float64 `json:"y"`
}
func TestMangosReqClient(t *testing.T){
   location := make([]Point, 0)
   if err := json.Unmarshal([]byte(""), &location); err == nil {
      fmt.Println("location:",location)
   } else {
      fmt.Println("unmarshal err:",err)
   }
}
func TestSdkApi_FindAll(t *testing.T) {
@@ -135,6 +146,18 @@
      fmt.Println("sdk Unmarshal err",err)
   }
   fmt.Println(sdkInfo.Args)
}
func TestTaskApi_FindAllForIpc(t *testing.T) {
   var api TaskApi
   taskSdks := api.FindAllTaskSdkRun()
   fmt.Println(taskSdks)
}
func TestSdkApi_FindAllSdkRun(t *testing.T) {
   var api SdkApi
   sdkRuns := api.FindAllSdkRun()
   fmt.Println(sdkRuns)
}
func TestSdkApi_GetAllSdkIds(t *testing.T) {
@@ -185,7 +208,13 @@
func TestCameraApi_GetCamerasByRunType(t *testing.T) {
   var api CameraApi
   flag, cameras := api.GetCamerasByRunType(0,"")
   flag, cameras := api.GetCamerasByRunType(1,"")
   fmt.Println("flag:",flag)
   fmt.Println("cameras:",cameras)
}
func TestSysSetApi_GetPollConfig(t *testing.T) {
   var api SysSetApi
   _, config := api.GetPollConfig()
   fmt.Println("config:",config)
}