MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / TestGetFileType

Function TestGetFileType

pkg/fs/file_test.go:31–59  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

29)
30
31func TestGetFileType(t *testing.T) {
32 var tests = []struct {
33 filename string
34 opts uint32
35 wants FileType
36 }{
37 {
38 `_fixtures`,
39 16777249,
40 Directory,
41 },
42 {
43 `_fixtures`,
44 25165857,
45 Directory,
46 },
47 {
48 `C:\Users\bunny\AppData\Local\Mozilla\Firefox\Profiles\profile1.tmp`,
49 18874368,
50 Regular,
51 },
52 }
53
54 for _, tt := range tests {
55 t.Run(tt.filename, func(t *testing.T) {
56 assert.Equal(t, tt.wants, GetFileType(tt.filename, tt.opts))
57 })
58 }
59}
60
61func TestGetFileInfo(t *testing.T) {
62 var tests = []struct {

Callers

nothing calls this directly

Calls 3

GetFileTypeFunction · 0.85
EqualMethod · 0.80
RunMethod · 0.65

Tested by

no test coverage detected