internal/cuetxtar: detect misplaced @test
Detect @test attributes silently ignored when
placed inside struct literals that are operands
of a binary expression (e.g. X & {f: v @test(...)}).
Such attributes are never visited by the inline
test runner and would pass without checking
anything; they are now reported as parse errors.
Also lower eqCompactThreshold from 60 to 40 to
produce indented output for moderately-sized
struct values.
Fix existing tests that used the now-illegal form
by moving @test to after the enclosing expression.
Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: I7a63656a7de18261d1f4126f5a30ef10fc840660
Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1235357
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>