-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfold_test.go
More file actions
46 lines (40 loc) · 725 Bytes
/
fold_test.go
File metadata and controls
46 lines (40 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package excelstruct
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestSimpleLetterEqualFold(t *testing.T) {
t.Parallel()
tests := []struct {
name string
s []byte
t []byte
want bool
}{
{
name: "equal bytes same case",
s: []byte("Hello"),
t: []byte("Hello"),
want: true,
},
{
name: "equal bytes different case",
s: []byte("Hello"),
t: []byte("HELLO"),
want: true,
},
{
name: "different bytes",
s: []byte("Hello"),
t: []byte("World"),
want: false,
},
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
assert.Equal(t, tt.want, simpleLetterEqualFold(tt.s, tt.t))
})
}
}