(t *testing.T)
| 92 | } |
| 93 | |
| 94 | func TestPlaceholderArray(t *testing.T) { |
| 95 | { |
| 96 | ret, _ := Preprocess("?, ?, ?", []interface{}{1, 2, []interface{}{3, 4, 5}}) |
| 97 | assert.Equal(t, "?, ?, (?, ?, ?)", ret) |
| 98 | } |
| 99 | |
| 100 | { |
| 101 | ret, _ := Preprocess("?, ?, ?", []interface{}{[]interface{}{1, 2, 3}, 4, 5}) |
| 102 | assert.Equal(t, "(?, ?, ?), ?, ?", ret) |
| 103 | } |
| 104 | |
| 105 | { |
| 106 | ret, _ := Preprocess("?, ?, ?", []interface{}{1, []interface{}{2, 3, 4}, 5}) |
| 107 | assert.Equal(t, "?, (?, ?, ?), ?", ret) |
| 108 | } |
| 109 | |
| 110 | { |
| 111 | ret, _ := Preprocess("???", []interface{}{1, []interface{}{2, 3, 4}, 5}) |
| 112 | assert.Equal(t, "?(?, ?, ?)?", ret) |
| 113 | } |
| 114 | |
| 115 | { |
| 116 | ret, _ := Preprocess("??", []interface{}{[]interface{}{1, 2, 3}, []interface{}{}, []interface{}{4, 5}, []interface{}{}}) |
| 117 | assert.Equal(t, "(?, ?, ?)(NULL)", ret) |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | func TestPlaceholderArguments(t *testing.T) { |
| 122 | { |
nothing calls this directly
no test coverage detected