]> Cypherpunks repositories - gostls13.git/commit
misc/cgo/errors: use expected column numbers
authorIan Lance Taylor <iant@golang.org>
Fri, 4 Jun 2021 15:16:58 +0000 (08:16 -0700)
committerIan Lance Taylor <iant@golang.org>
Sat, 5 Jun 2021 04:40:03 +0000 (04:40 +0000)
commit9d669ed47a502ca540c7f3329f84d89fc0c53971
treecad843a75695027ffe3dfd4f90fcbe2054961e99
parent95939e8de71d9e8d8deea3d1605bd34130588292
misc/cgo/errors: use expected column numbers

The test was using the wrong column numbers, and was erroneously
passing because there happened to be line numbers that matched those
column numbers. Change the test harness to require the expected line
number for the ERROR HERE regexp case, so that this doesn't happen again.

Also rename a couple of variables in the test to avoid useless
redeclaration errors.

Fixes #46534

Change-Id: I2fcbf5e379c346de5346035c73d174a3980c0927
Reviewed-on: https://go-review.googlesource.com/c/go/+/324970
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
misc/cgo/errors/errors_test.go
misc/cgo/errors/testdata/err2.go