We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0141f0 commit 02b5cadCopy full SHA for 02b5cad
options_test.go
@@ -222,3 +222,26 @@ func TestReadTimeoutOptions(t *testing.T) {
222
}
223
224
225
+
226
+func TestProtocolOptions(t *testing.T) {
227
+ testCasesMap := map[int]int{
228
+ 0: 3,
229
+ 1: 3,
230
+ 2: 2,
231
+ 3: 3,
232
+ }
233
234
+ o := &Options{}
235
+ o.init()
236
+ if o.Protocol != 3 {
237
+ t.Errorf("got %d instead of %d as protocol option", o.Protocol, 3)
238
239
240
+ for set, want := range testCasesMap {
241
+ o := &Options{Protocol: set}
242
243
+ if o.Protocol != want {
244
+ t.Errorf("got %d instead of %d as protocol option", o.Protocol, want)
245
246
247
+}
0 commit comments