cmd/compile: make TestAssembly resilient to output ordering
To preserve reproducible builds, the text entries during compilation will be sorted before being printed. TestAssembly currently assumes that function init comes after all user-defined functions. Remove that assumption. Instead of looking for "TEXT" to tell you where a function ends--which may now yield lots of non-function-code junk--look for a line beginning with non-whitespace. Updates #15756 Change-Id: Ibc82dba6143d769ef4c391afc360e523b1a51348 Reviewed-on: https://go-review.googlesource.com/39853 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Showing
Please register or sign in to comment