struct_test: fix test cases for Go 1.10

Added Go 1.10 to CI.
This commit is contained in:
Unknwon
2018-03-06 06:02:36 -05:00
parent e88632e2fb
commit 1d1add4bb9
2 changed files with 6 additions and 5 deletions
+1
View File
@@ -6,6 +6,7 @@ go:
- 1.7.x
- 1.8.x
- 1.9.x
- 1.10.x
script:
- go get golang.org/x/tools/cmd/cover
+5 -5
View File
@@ -37,7 +37,7 @@ type testNested struct {
Unused int `ini:"-"`
}
type testEmbeded struct {
type TestEmbeded struct {
GPA float64
}
@@ -49,7 +49,7 @@ type testStruct struct {
Born time.Time
Time time.Duration `ini:"Duration"`
Others testNested
*testEmbeded `ini:"grade"`
*TestEmbeded `ini:"grade"`
Unused int `ini:"-"`
Unsigned uint
Omitted bool `ini:"omitthis,omitempty"`
@@ -97,12 +97,12 @@ type unsupport2 struct {
}
}
type unsupport3 struct {
type Unsupport3 struct {
Cities byte
}
type unsupport4 struct {
*unsupport3 `ini:"Others"`
*Unsupport3 `ini:"Others"`
}
type defaultValue struct {
@@ -155,7 +155,7 @@ func Test_MapToStruct(t *testing.T) {
So(fmt.Sprint(ts.Others.Populations), ShouldEqual, "[12345678 98765432]")
So(fmt.Sprint(ts.Others.Coordinates), ShouldEqual, "[192.168 10.11]")
So(ts.Others.Note, ShouldEqual, "Hello world!")
So(ts.testEmbeded.GPA, ShouldEqual, 2.8)
So(ts.TestEmbeded.GPA, ShouldEqual, 2.8)
})
Convey("Map section to struct", func() {