[committed] Fix compilation error in 2 1_neg.cc tests
Jonathan Wakely
jwakely@redhat.com
Wed Jul 31 20:59:20 GMT 2024
On Wed, 31 Jul 2024 at 21:44, François Dumont <frs.dumont@gmail.com> wrote:
>
> Committed as trivial.
>
> Fix a compilation error that is not expected by the tests preserving
> the expected ones.
>
> The 'test' variable declaration is missing since commit
> a9260b7eb688df43a724e25421ba40f35a89fee9 that removed the test global
> variable in testsuite files.
Oh good catch!
The problem is that the dg-error "no" is matching two errors on that
line, the "'test' was not declared" one and the "no match" one.
I think we should get rid of the 'test' variable again, and use a
better dg-error pattern. "no" is much too short and matches too much.
There's no need to assign the expressions to a variable, they're
ill-formed anyway.
So:
itr != mapByName.end(); // { dg-error "no match" }
itr == mapByName.end(); // { dg-error "no match" }
>
> libstdc++-v3/ChangeLog:
>
> * testsuite/23_containers/map/operators/1_neg.cc (test01): Add test
> variable
> declaration.
> * testsuite/23_containers/set/operators/1_neg.cc (test01): Likewise.
>
> François
More information about the Libstdc++
mailing list