(t *testing.T)
| 12 | ) |
| 13 | |
| 14 | func TestGetWshMethodDataParamsAndExpr_MultiArg(t *testing.T) { |
| 15 | methodDecl := &wshrpc.WshRpcMethodDecl{ |
| 16 | CommandDataTypes: []reflect.Type{ |
| 17 | reflect.TypeOf(""), |
| 18 | reflect.TypeOf(0), |
| 19 | }, |
| 20 | } |
| 21 | params, expr := getWshMethodDataParamsAndExpr(methodDecl) |
| 22 | if params != ", arg1 string, arg2 int" { |
| 23 | t.Fatalf("unexpected params: %q", params) |
| 24 | } |
| 25 | if expr != "wshrpc.MultiArg{Args: []any{arg1, arg2}}" { |
| 26 | t.Fatalf("unexpected expr: %q", expr) |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | func TestGenMethodCall_MultiArg(t *testing.T) { |
| 31 | methodDecl := &wshrpc.WshRpcMethodDecl{ |
nothing calls this directly
no test coverage detected