]> Cypherpunks repositories - gostls13.git/commit
test: relax whitespaces matching in codegen tests
authorGiovanni Bajo <rasky@develer.com>
Sat, 19 May 2018 07:42:52 +0000 (09:42 +0200)
committerGiovanni Bajo <rasky@develer.com>
Sun, 2 Sep 2018 10:31:37 +0000 (10:31 +0000)
commitf02cc88f46e01c21e550dbf212aefcdad138a91d
tree10f13788e0eb669602c0196b7d636c2d11162e37
parentc9cc20bd3ad7ab68f620cb650376f1c01dc1167e
test: relax whitespaces matching in codegen tests

The codegen testsuite uses regexp to parse the syntax, but it doesn't
have a way to tell line comments containing checks from line comments
containing English sentences. This means that any syntax error (that
is, non-matching regexp) is currently ignored and not reported.

There were some tests in memcombine.go that had an extraneous space
and were thus effectively disabled. It would be great if we could
report it as a syntax error, but for now we just punt and swallow the
spaces as a workaround, to avoid the same mistake again.

Fixes #25452

Change-Id: Ic7747a2278bc00adffd0c199ce40937acbbc9cf0
Reviewed-on: https://go-review.googlesource.com/113835
Run-TryBot: Giovanni Bajo <rasky@develer.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
test/codegen/memcombine.go
test/run.go