Sha256: 27b8dd06dbbb4bcdfa99561d1a0bafe1fdb4be232bf665572bb83f8d54f43fad
Contents?: true
Size: 684 Bytes
Versions: 59
Compression:
Stored size: 684 Bytes
Contents
package secret import ( "reflect" "testing" ) const targetTestVersion = 2 func TestTestVersion(t *testing.T) { if testVersion != targetTestVersion { t.Fatalf("Found testVersion = %v, want %v", testVersion, targetTestVersion) } } func TestHandshake(t *testing.T) { for _, test := range tests { h := Handshake(test.code) // use len() to allow either nil or empty list, because // they are not equal by DeepEqual if len(h) == 0 && len(test.h) == 0 { continue } if !reflect.DeepEqual(h, test.h) { t.Fatalf("Handshake(%d) = %q, want %q.", test.code, h, test.h) } } } func BenchmarkHandshake(b *testing.B) { for i := 0; i < b.N; i++ { Handshake(31) } }
Version data entries
59 entries across 59 versions & 1 rubygems