Skip to content

Commit

Permalink
ditch the last use of reflect in the tests (#723)
Browse files Browse the repository at this point in the history
cmp is already in place, so we use it.
  • Loading branch information
jmhodges authored Sep 3, 2024
1 parent 8c1c769 commit 1c44819
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ import (
"log"
"net"
"os"
"reflect"
"strconv"
"testing"
"time"

"github.com/google/go-cmp/cmp"

tls "github.com/jmhodges/howsmyssl/tls110"
)

Expand Down Expand Up @@ -178,7 +179,7 @@ func TestSweet32(t *testing.T) {
}
t.Errorf("#%d, num cipher suites given: want %d, got %d (%v, %v)", i, len(st.suites), len(ci.GivenCipherSuites), suites, ci.GivenCipherSuites)
}
if !reflect.DeepEqual(st.expected, ci.InsecureCipherSuites) {
if !cmp.Equal(st.expected, ci.InsecureCipherSuites) {
t.Errorf("#%d, insecure cipher suites found: want %s, got %s", i, st.expected, ci.InsecureCipherSuites)
}
},
Expand Down

0 comments on commit 1c44819

Please sign in to comment.