mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 02:27:48 +00:00
2c7ea98ccf
With this, 'tinygo test' in github.com/pkg/errors at least compiles and passes a few tests:
$ git clone github.com/pkg/errors
$ cd errors
$ tinygo test -c
$ for a in $(go test -list Test | grep Test); do ./errors.test -test.run $a -test.v > $a.log 2>&1; done
$ grep -l PASS *.log | wc -l
19
$ grep -l FAIL *.log | wc -l
11
For https://github.com/tinygo-org/tinygo/issues/2445
25 lines
360 B
Go
25 lines
360 B
Go
package runtime
|
|
|
|
type Func struct {
|
|
}
|
|
|
|
func FuncForPC(pc uintptr) *Func {
|
|
return nil
|
|
}
|
|
|
|
func (f *Func) Name() string {
|
|
return ""
|
|
}
|
|
|
|
func (f *Func) FileLine(pc uintptr) (file string, line int) {
|
|
return "", 0
|
|
}
|
|
|
|
func Caller(skip int) (pc uintptr, file string, line int, ok bool) {
|
|
return 0, "", 0, false
|
|
}
|
|
|
|
func Stack(buf []byte, all bool) int {
|
|
return 0
|
|
}
|