@@ -14,8 +14,8 @@ import (
1414func createTestImage (width , height int ) image.Image {
1515 img := image .NewRGBA (image .Rect (0 , 0 , width , height ))
1616 // Fill with a simple pattern for visual verification
17- for y := 0 ; y < height ; y ++ {
18- for x := 0 ; x < width ; x ++ {
17+ for y := range height {
18+ for x := range width {
1919 img .Set (x , y , color.RGBA {
2020 R : uint8 ((x * 255 ) / width ),
2121 G : uint8 ((y * 255 ) / height ),
@@ -245,11 +245,11 @@ func TestResizeConcurrency(t *testing.T) {
245245 results := make (chan image.Image , numGoroutines * numOperations )
246246
247247 // Launch multiple goroutines doing resize operations
248- for i := 0 ; i < numGoroutines ; i ++ {
248+ for i := range numGoroutines {
249249 wg .Add (1 )
250250 go func (id int ) {
251251 defer wg .Done ()
252- for j := 0 ; j < numOperations ; j ++ {
252+ for j := range numOperations {
253253 size := uint (20 + (id + j )% 30 ) // Vary sizes
254254 result := ResizeImage (img , size , size , fmt .Sprintf ("concurrent_%d_%d" , id , j ))
255255 results <- result
@@ -331,8 +331,8 @@ func TestImageProcessingQuality(t *testing.T) {
331331 img := image .NewRGBA (image .Rect (0 , 0 , 4 , 4 ))
332332
333333 // Create a checkerboard pattern
334- for y := 0 ; y < 4 ; y ++ {
335- for x := 0 ; x < 4 ; x ++ {
334+ for y := range 4 {
335+ for x := range 4 {
336336 if (x + y )% 2 == 0 {
337337 img .Set (x , y , color.RGBA {255 , 255 , 255 , 255 }) // White
338338 } else {
@@ -423,7 +423,7 @@ func TestMemoryUsage(t *testing.T) {
423423 runtime .ReadMemStats (& m1 )
424424
425425 // Create and resize many images
426- for i := 0 ; i < 100 ; i ++ {
426+ for i := range 100 {
427427 img := createTestImage (100 , 100 )
428428 _ = ResizeImage (img , 50 , 50 , fmt .Sprintf ("memory_test_%d" , i ))
429429 if i % 10 == 0 {
0 commit comments