[patch] Some testsuite cleanup

Jonathan Wakely jwakely@redhat.com
Thu Jul 28 21:06:00 GMT 2016


This is a set of small patches for issues in the testsuite that I
noticed while working on a big change (coming soon).

Self-explanatory:

    Fix invalid dg-do directives in libstdc++ tests
    
        * testsuite/22_locale/conversions/string/1.cc: Remove unintended
        dg-do compile directive.
        * testsuite/26_numerics/headers/cmath/fabs_inline.cc: Fix syntax of
        dg-do directive.
        * testsuite/26_numerics/valarray/const_bracket.cc: Likewise.

The dg-options for FreeBSD and Dragonfly should have included
-std=gnu++11, or should have used dg-additional-options to add to,
rather than override, the common dg-options.

    Use dg-additional-options in libstdc++ tests
    
        * testsuite/17_intro/headers/c++2011/stdc++.cc: Change target-specific
        dg-options to dg-additional-options so that default options are used.
        * testsuite/17_intro/headers/c++2011/stdc++_multiple_inclusion.cc:
        Likewise.
        * testsuite/17_intro/headers/c++2014/stdc++.cc: Likewise.
        * testsuite/17_intro/headers/c++2014/stdc++_multiple_inclusion.cc:
        Likewise.
        * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc:
        Use dg-additional-options instead of repeating the common options.

When I added _Temporary_object to vector recently I updated the
construct/destroy counts in this test to match, but the changes only
apply for C++11 and later. This makes the test pass whether run as
C++98 or C++11 and later.

    Fix std::vector test to pass in C++98 mode
    
        * testsuite/23_containers/vector/check_construct_destroy.cc: Account
        for different construct/destroy counts in C++98 mode.

The dg-prune-output directives in these tests are needed to prune some
additional errors that are only issued in C++98 mode, but the line
numbers had got out of date. I've replaced the hardcoded numbers with
strings that will stay valid.

    Fix DR 438 container tests to pass in C++98 mode
    
        * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc:
        Adjust dg-prune-output pattern for error in C++98 mode.
        * testsuite/23_containers/deque/requirements/dr438/
        constructor_1_neg.cc: Likewise.
        * testsuite/23_containers/deque/requirements/dr438/
        constructor_2_neg.cc: Likewise.
        * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
        Likewise.
        * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
        Likewise.
        * testsuite/23_containers/list/requirements/dr438/
        constructor_1_neg.cc: Likewise.
        * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
        Likewise.
        * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
        Likewise.
        * testsuite/23_containers/vector/requirements/dr438/
        constructor_1_neg.cc: Likewise.
        * testsuite/23_containers/vector/requirements/dr438/
        constructor_2_neg.cc: Likewise.
        * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
        Likewise.

Tested x86_64-linux, committed to trunk.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 15089 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20160728/e9f3693f/attachment.bin>


More information about the Libstdc++ mailing list