diff options
Diffstat (limited to 'test/inline_testingbloop.go')
| -rw-r--r-- | test/inline_testingbloop.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/inline_testingbloop.go b/test/inline_testingbloop.go index 9d5138e2d8..cbdf905993 100644 --- a/test/inline_testingbloop.go +++ b/test/inline_testingbloop.go @@ -19,13 +19,19 @@ func cannotinline(b *testing.B) { // ERROR "b does not escape" "cannot inline ca for i := 0; i < b.N; i++ { caninline(1) // ERROR "inlining call to caninline" } - for b.Loop() { // ERROR "skip inlining within testing.B.loop" + for b.Loop() { // ERROR "skip inlining within testing.B.loop" "inlining call to testing\.\(\*B\)\.Loop" caninline(1) } for i := 0; i < b.N; i++ { caninline(1) // ERROR "inlining call to caninline" } - for b.Loop() { // ERROR "skip inlining within testing.B.loop" + for b.Loop() { // ERROR "skip inlining within testing.B.loop" "inlining call to testing\.\(\*B\)\.Loop" + caninline(1) + } + for i := 0; i < b.N; i++ { + caninline(1) // ERROR "inlining call to caninline" + } + for b.Loop() { // ERROR "skip inlining within testing.B.loop" "inlining call to testing\.\(\*B\)\.Loop" caninline(1) } } |
