]> Cypherpunks repositories - gostls13.git/commit
cmd/cover: fix sorting of profile segment boundaries
authorDavid Symonds <dsymonds@golang.org>
Mon, 28 May 2018 03:03:08 +0000 (13:03 +1000)
committerDavid Symonds <dsymonds@golang.org>
Mon, 28 May 2018 03:35:36 +0000 (03:35 +0000)
commit4fe688c6a49e59e852f0bfebbb4cf71366987ce7
tree8c9e6f79b7c1b78b07e6191d846b3f96d0b18769
parentc1d9d1f305df19c66e28a619e17f9f1d7563d977
cmd/cover: fix sorting of profile segment boundaries

If a span of coverable code is empty (e.g. an empty select clause)
then there will be two Boundary values with the same offset. In that
case, the starting Boundary needs to come first so that the generated
HTML output will open the <span> tag before it tries to close it.

Change-Id: Ib44a8b7c36ae57757c18b6cceb7a88ffa4e95394
Reviewed-on: https://go-review.googlesource.com/114855
Reviewed-by: Rob Pike <r@golang.org>
Run-TryBot: Rob Pike <r@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/cover/profile.go