(val *pb.TaskValue)
| 19 | ) |
| 20 | |
| 21 | func subgraphWithSingleResultAndSingleValue(val *pb.TaskValue) *SubGraph { |
| 22 | return &SubGraph{ |
| 23 | Params: params{Alias: "query"}, |
| 24 | SrcUIDs: &pb.List{Uids: []uint64{1}}, |
| 25 | DestUIDs: &pb.List{Uids: []uint64{1}}, |
| 26 | uidMatrix: []*pb.List{{Uids: []uint64{1}}}, |
| 27 | Children: []*SubGraph{ |
| 28 | { |
| 29 | Attr: "val", |
| 30 | SrcUIDs: &pb.List{Uids: []uint64{1}}, |
| 31 | uidMatrix: []*pb.List{{}}, |
| 32 | valueMatrix: []*pb.ValueList{ |
| 33 | // UID 1 |
| 34 | { |
| 35 | Values: []*pb.TaskValue{val}, |
| 36 | }, |
| 37 | }, |
| 38 | }, |
| 39 | }, |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | func assertJSON(t *testing.T, expected string, sg *SubGraph) { |
| 44 | buf, err := ToJson(context.Background(), &Latency{}, []*SubGraph{sg}, nil) |
no outgoing calls
no test coverage detected