File: allocate_go119_test.go

package info (click to toggle)
golang-github-multiformats-go-multihash 0.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 376 kB
  • sloc: sh: 138; makefile: 39
file content (11 lines) | stat: -rw-r--r-- 295 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
//go:build !go1.20

package multihash

import "testing"

func mustNotAllocateMore(_ *testing.T, _ float64, f func()) {
	// the compiler isn't able to detect our outlined stack allocation on before
	// 1.20 so let's not test for it. We don't mind if outdated versions are slightly slower.
	f()
}