(t *testing.T)
| 854 | } |
| 855 | |
| 856 | func TestExtractGoFunctionCallParams(t *testing.T) { |
| 857 | tests := []struct { |
| 858 | name string |
| 859 | input string |
| 860 | expected string |
| 861 | }{ |
| 862 | { |
| 863 | name: "no parameters", |
| 864 | input: "func test() {}", |
| 865 | expected: "", |
| 866 | }, |
| 867 | { |
| 868 | name: "single parameter", |
| 869 | input: "func test(name string) {}", |
| 870 | expected: "name", |
| 871 | }, |
| 872 | { |
| 873 | name: "multiple parameters", |
| 874 | input: "func test(a int, b string, c bool) {}", |
| 875 | expected: "a, b, c", |
| 876 | }, |
| 877 | { |
| 878 | name: "pointer parameters", |
| 879 | input: "func test(data *go_string, opts *go_nullable) {}", |
| 880 | expected: "data, opts", |
| 881 | }, |
| 882 | } |
| 883 | |
| 884 | for _, tt := range tests { |
| 885 | t.Run(tt.name, func(t *testing.T) { |
| 886 | result := extractGoFunctionCallParams(tt.input) |
| 887 | assert.Equal(t, tt.expected, result) |
| 888 | }) |
| 889 | } |
| 890 | } |
| 891 | |
| 892 | func TestGoFileGenerator_SourceFilePreservation(t *testing.T) { |
| 893 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected