Closed shogo82148 closed 7 years ago
Tested on windows go 1.8.1 test can pass.
λ go test -v
=== RUN TestGetIcon
--- PASS: TestGetIcon (0.01s)
apk_test.go:20: app label: HelloWorld
PASS
ok github.com/codeskyblue/androidbinary/apk 0.208s
Maybe can be fixed by set go version to 1.8.1, not 1.8
Also tested on linux/amd64 debian7 go 1.8.1, test passed.
Great
The following code doesn't report any error in my environment(go version go1.8.1 darwin/amd64)... Why??
package main
import (
"encoding/xml"
"fmt"
)
type Elem struct {
Attr int `xml:"attr,attr"`
}
func main() {
var elem Elem
xmldata := `<elem attr="@0x7F08008E"></elem>`
fmt.Println(xml.Unmarshal([]byte(xmldata), &elem))
fmt.Printf("%+v\n", elem)
}
But, Go Playground reports strconv.ParseInt: parsing "@0x7F08008E": invalid syntax
https://play.golang.org/p/36_S_scN_X
<nil>
strconv.ParseInt: parsing "@0x7F08008E": invalid syntax
FYI Results of my environment are below.
go version go1.8 darwin/amd64 => strconv.ParseInt: parsing "@0x7F08008E": invalid syntax
go version go1.8.1 darwin/amd64 => <nil>
go version go1.7.3 linux/amd64 => <nil>
go version go1.8.1 linux/amd64 => <nil>
Thank you!
I found it!
// For Go 1.8.1 we've restored the old "no errors reported" behavior.
// We'll try again in Go 1.9 to report errors.
tests fail on travis Go 1.8... Why??