unsupported_funcs.go 952 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package testing
  2. import (
  3. "testing"
  4. )
  5. func AllocsPerRun(runs int, f func()) (avg float64) {
  6. panic(unsupportedApi("testing.AllocsPerRun"))
  7. }
  8. func CoverMode() string {
  9. panic(unsupportedApi("testing.CoverMode"))
  10. }
  11. func Coverage() float64 {
  12. panic(unsupportedApi("testing.Coverage"))
  13. }
  14. func Init() {
  15. panic(unsupportedApi("testing.Init"))
  16. }
  17. func RegisterCover(c testing.Cover) {
  18. panic(unsupportedApi("testing.RegisterCover"))
  19. }
  20. func RunExamples(matchString func(pat, str string) (bool, error), examples []testing.InternalExample) (ok bool) {
  21. panic(unsupportedApi("testing.RunExamples"))
  22. }
  23. func RunTests(matchString func(pat, str string) (bool, error), tests []testing.InternalTest) (ok bool) {
  24. panic(unsupportedApi("testing.RunTests"))
  25. }
  26. func Short() bool {
  27. return false
  28. }
  29. func Verbose() bool {
  30. panic(unsupportedApi("testing.Verbose"))
  31. }
  32. type M struct {}
  33. func (m *M) Run() (code int) {
  34. panic("testing.M is not support in libFuzzer Mode")
  35. }