|
6 | 6 | "encoding/hex" |
7 | 7 | "os" |
8 | 8 | "path/filepath" |
9 | | - "strings" |
10 | 9 | "testing" |
11 | 10 |
|
12 | 11 | "github.com/stretchr/testify/assert" |
@@ -1238,26 +1237,6 @@ func TestGoFileGenerator_phpTypeToGoType(t *testing.T) { |
1238 | 1237 | }) |
1239 | 1238 | } |
1240 | 1239 |
|
1241 | | -func testGoFileInternalFunctions(t *testing.T, content string) { |
1242 | | - internalIndicators := []string{ |
1243 | | - "func internalHelper", |
1244 | | - "func anotherHelper", |
1245 | | - } |
1246 | | - |
1247 | | - foundInternal := false |
1248 | | - for _, indicator := range internalIndicators { |
1249 | | - if strings.Contains(content, indicator) { |
1250 | | - foundInternal = true |
1251 | | - |
1252 | | - break |
1253 | | - } |
1254 | | - } |
1255 | | - |
1256 | | - if !foundInternal { |
1257 | | - t.Log("No internal functions found (this may be expected)") |
1258 | | - } |
1259 | | -} |
1260 | | - |
1261 | 1240 | func testGeneratedFileBasicStructure(t *testing.T, content, expectedPackage, baseName string) { |
1262 | 1241 | requiredElements := []string{ |
1263 | 1242 | "package " + expectedPackage, |
@@ -1292,15 +1271,6 @@ func testGeneratedFileWrappers(t *testing.T, content string, functions []phpFunc |
1292 | 1271 | } |
1293 | 1272 | } |
1294 | 1273 |
|
1295 | | -// compareFileContents compares two files byte-by-byte |
1296 | | -func compareFileContents(t *testing.T, file1, file2 string) bool { |
1297 | | - content1, err := os.ReadFile(file1) |
1298 | | - require.NoError(t, err) |
1299 | | - content2, err := os.ReadFile(file2) |
1300 | | - require.NoError(t, err) |
1301 | | - return bytes.Equal(content1, content2) |
1302 | | -} |
1303 | | - |
1304 | 1274 | // computeFileHash returns SHA256 hash of file |
1305 | 1275 | func computeFileHash(t *testing.T, filename string) string { |
1306 | 1276 | content, err := os.ReadFile(filename) |
|
0 commit comments