-
Notifications
You must be signed in to change notification settings - Fork 1
/
redistributable_test.go
41 lines (39 loc) · 972 Bytes
/
redistributable_test.go
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
package redistributable
import (
"fmt"
"testing"
)
func TestIsInstalled(t *testing.T) {
type args struct {
redistributableVersion int
}
tests := []struct {
name string
args args
}{
{"VC2005x86", args{VC2005x86}},
{"VC2005x64", args{VC2005x64}},
{"VC2008x86", args{VC2008x86}},
{"VC2008x64", args{VC2008x64}},
{"VC2010x86", args{VC2010x86}},
{"VC2010x64", args{VC2010x64}},
{"VC2012x86", args{VC2012x86}},
{"VC2012x64", args{VC2012x64}},
{"VC2013x86", args{VC2013x86}},
{"VC2013x64", args{VC2013x64}},
{"VC2015x86", args{VC2015x86}},
{"VC2015x64", args{VC2015x64}},
{"VC2017x86", args{VC2017x86}},
{"VC2017x64", args{VC2017x64}},
{"VC2015to2019x86", args{VC2015to2019x86}},
{"VC2015to2019x64", args{VC2015to2019x64}},
}
for _, tt := range tests {
installed := IsInstalled(tt.args.redistributableVersion)
if installed {
fmt.Printf("%s: INSTALLED\n", tt.name)
} else {
fmt.Printf("%s: missing\n", tt.name)
}
}
}