diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2024-08-01 06:53:03 +0200 |
---|---|---|
committer | François Dumont <fdumont@gcc.gnu.org> | 2024-08-01 18:52:55 +0200 |
commit | 0d514c11ef5931d61917c0c663646e73154f8473 (patch) | |
tree | 86c89edd73dfd25dfebbd363b3dd17f19e9505bc /libstdc++-v3/testsuite | |
parent | 295b729da5aa430a8c5df1422644159ca8bf8dcb (diff) | |
download | gcc-0d514c11ef5931d61917c0c663646e73154f8473.zip gcc-0d514c11ef5931d61917c0c663646e73154f8473.tar.gz gcc-0d514c11ef5931d61917c0c663646e73154f8473.tar.bz2 |
libstdc++: Make dg-error pattern more accurate
Remove useless test variable and use a more accurate dg-error pattern so
that only the ill-formed expression compilation error is considered.
libstdc++-v3/ChangeLog:
* testsuite/23_containers/map/operators/1_neg.cc (test01): Remove test variable
and use 'no match' dg-error patter.
* testsuite/23_containers/set/operators/1_neg.cc (test01): Likewise.
Diffstat (limited to 'libstdc++-v3/testsuite')
-rw-r--r-- | libstdc++-v3/testsuite/23_containers/map/operators/1_neg.cc | 4 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/23_containers/set/operators/1_neg.cc | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libstdc++-v3/testsuite/23_containers/map/operators/1_neg.cc b/libstdc++-v3/testsuite/23_containers/map/operators/1_neg.cc index 0eb1eee..6ce7b32 100644 --- a/libstdc++-v3/testsuite/23_containers/map/operators/1_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/map/operators/1_neg.cc @@ -35,6 +35,6 @@ void test01() std::map<unsigned, int>::iterator itr(mapByIndex.begin()); // NB: notice, it's not mapByIndex!! - bool __attribute__((unused)) test = itr != mapByName.end(); // { dg-error "no" } - test &= itr == mapByName.end(); // { dg-error "no" } + itr != mapByName.end(); // { dg-error "no match" } + itr == mapByName.end(); // { dg-error "no match" } } diff --git a/libstdc++-v3/testsuite/23_containers/set/operators/1_neg.cc b/libstdc++-v3/testsuite/23_containers/set/operators/1_neg.cc index 28d08f3..b5f69ae 100644 --- a/libstdc++-v3/testsuite/23_containers/set/operators/1_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/set/operators/1_neg.cc @@ -32,6 +32,6 @@ void test01() std::set<unsigned int>::iterator itr(setByIndex.begin()); // NB: it's not setByIndex!! - bool __attribute__((unused)) test = itr != setByName.end(); // { dg-error "no" } - test &= itr == setByName.end(); // { dg-error "no" } + itr != setByName.end(); // { dg-error "no match" } + itr == setByName.end(); // { dg-error "no match" } } |