forked from mitchellh/gox
-
Notifications
You must be signed in to change notification settings - Fork 2
/
platform_test.go
46 lines (37 loc) · 886 Bytes
/
platform_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
42
43
44
45
46
package main
import (
"reflect"
"testing"
)
func TestSupportedPlatforms(t *testing.T) {
var ps []Platform
ps = SupportedPlatforms("go1.0")
if !reflect.DeepEqual(ps, Platforms_1_0) {
t.Fatalf("bad: %#v", ps)
}
ps = SupportedPlatforms("go1.1")
if !reflect.DeepEqual(ps, Platforms_1_1) {
t.Fatalf("bad: %#v", ps)
}
ps = SupportedPlatforms("go1.3")
if !reflect.DeepEqual(ps, Platforms_1_3) {
t.Fatalf("bad: %#v", ps)
}
ps = SupportedPlatforms("go1.4")
if !reflect.DeepEqual(ps, Platforms_1_4) {
t.Fatalf("bad: %#v", ps)
}
ps = SupportedPlatforms("go1.5")
if !reflect.DeepEqual(ps, Platforms_1_5) {
t.Fatalf("bad: %#v", ps)
}
ps = SupportedPlatforms("go1.6")
if !reflect.DeepEqual(ps, Platforms_1_6) {
t.Fatalf("bad: %#v", ps)
}
// Unknown
ps = SupportedPlatforms("foo")
if !reflect.DeepEqual(ps, Platforms_1_6) {
t.Fatalf("bad: %#v", ps)
}
}