diff options
Diffstat (limited to 'src/os/exec')
| -rw-r--r-- | src/os/exec/env_test.go | 4 | ||||
| -rw-r--r-- | src/os/exec/exec_posix_test.go | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/os/exec/env_test.go b/src/os/exec/env_test.go index ea06af3885..9fd022b2ee 100644 --- a/src/os/exec/env_test.go +++ b/src/os/exec/env_test.go @@ -5,7 +5,7 @@ package exec import ( - "reflect" + "slices" "testing" ) @@ -60,7 +60,7 @@ func TestDedupEnv(t *testing.T) { } for _, tt := range tests { got, err := dedupEnvCase(tt.noCase, tt.nulOK, tt.in) - if !reflect.DeepEqual(got, tt.want) || (err != nil) != tt.wantErr { + if !slices.Equal(got, tt.want) || (err != nil) != tt.wantErr { t.Errorf("Dedup(%v, %q) = %q, %v; want %q, error:%v", tt.noCase, tt.in, got, err, tt.want, tt.wantErr) } } diff --git a/src/os/exec/exec_posix_test.go b/src/os/exec/exec_posix_test.go index 5d828b3475..45604203dd 100644 --- a/src/os/exec/exec_posix_test.go +++ b/src/os/exec/exec_posix_test.go @@ -13,8 +13,8 @@ import ( "os" "os/user" "path/filepath" - "reflect" "runtime" + "slices" "strconv" "strings" "syscall" @@ -184,7 +184,7 @@ func TestImplicitPWD(t *testing.T) { wantPWDs = nil } } - if !reflect.DeepEqual(pwds, wantPWDs) { + if !slices.Equal(pwds, wantPWDs) { t.Errorf("PWD entries in cmd.Environ():\n\t%s\nwant:\n\t%s", strings.Join(pwds, "\n\t"), strings.Join(wantPWDs, "\n\t")) } @@ -257,7 +257,7 @@ func TestExplicitPWD(t *testing.T) { } wantPWDs := []string{tc.pwd} - if !reflect.DeepEqual(pwds, wantPWDs) { + if !slices.Equal(pwds, wantPWDs) { t.Errorf("PWD entries in cmd.Environ():\n\t%s\nwant:\n\t%s", strings.Join(pwds, "\n\t"), strings.Join(wantPWDs, "\n\t")) } |
