Conditions | 4 |
Total Lines | 22 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | //////////////////////////////////////////////////////////////////////////////// |
||
33 | func TestWrite(t *testing.T) { |
||
34 | type args struct { |
||
35 | p []byte |
||
36 | } |
||
37 | tests := []struct { |
||
38 | name string |
||
39 | args args |
||
40 | strategy Strategy |
||
41 | wantErr bool |
||
42 | }{ |
||
43 | { |
||
44 | args: args{ |
||
45 | []byte("Hello, Alog!"), |
||
46 | }, |
||
47 | strategy: Strategy{}, |
||
48 | wantErr: false, |
||
49 | }, |
||
50 | } |
||
51 | for _, tt := range tests { |
||
52 | t.Run(tt.name, func(t *testing.T) { |
||
53 | if _, err := tt.strategy.Write(tt.args.p); (err != nil) != tt.wantErr { |
||
54 | t.Errorf("Write() error = %v, wantErr %v", err, tt.wantErr) |
||
55 | } |
||
59 |