vars_test.go 377 B

12345678910111213141516171819
  1. package model
  2. import (
  3. "encoding/json"
  4. "metawant.greentech.com.cn/gaoyagang/gt-common/identify"
  5. "testing"
  6. )
  7. func TestEvent_SetT(t *testing.T) {
  8. _ = `{"C.M.UF1_DB@word_control":{"NvIn":["26"]},"C.M.UF1_DB@time_production":{"NvIn":["360...660"]}}`
  9. jso1 := `{"NvIn":["26"]}`
  10. x := identify.Rule{}
  11. err := json.Unmarshal([]byte(jso1), &x)
  12. t.Log(err)
  13. t.Logf("%+v", x)
  14. }