public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc(refs/users/marxin/heads/cond-expr-ssa-name)] libstdc++: Adjust std::from_chars negative tests Date: Wed, 24 Jun 2020 09:25:03 +0000 (GMT) [thread overview] Message-ID: <20200624092503.A574339874D9@sourceware.org> (raw) https://gcc.gnu.org/g:b81d4f1e3d6a519afa20d84304f12ee639fde944 commit b81d4f1e3d6a519afa20d84304f12ee639fde944 Author: Jonathan Wakely <jwakely@redhat.com> Date: Tue Jun 23 12:20:26 2020 +0100 libstdc++: Adjust std::from_chars negative tests Also test with an enumeration type. Move the dg-error directives outside the #if block, because DejaGnu would process them whether or not wchar_t support is present. libstdc++-v3/ChangeLog: * testsuite/20_util/from_chars/1_c++20_neg.cc: Check enumeration type. * testsuite/20_util/from_chars/1_neg.cc: Likewise. Move dg-error directives outside preprocessor condition. Diff: --- libstdc++-v3/testsuite/20_util/from_chars/1_c++20_neg.cc | 3 +++ libstdc++-v3/testsuite/20_util/from_chars/1_neg.cc | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/testsuite/20_util/from_chars/1_c++20_neg.cc b/libstdc++-v3/testsuite/20_util/from_chars/1_c++20_neg.cc index 8a73b2de72d..8454b304d13 100644 --- a/libstdc++-v3/testsuite/20_util/from_chars/1_c++20_neg.cc +++ b/libstdc++-v3/testsuite/20_util/from_chars/1_c++20_neg.cc @@ -35,6 +35,9 @@ test01(const char* first, const char* last) char32_t c32; std::from_chars(first, last, c32); // { dg-error "no matching" } std::from_chars(first, last, c32, 10); // { dg-error "no matching" } + enum E { } e; + std::from_chars(first, last, e); // { dg-error "no matching" } + std::from_chars(first, last, e, 10); // { dg-error "no matching" } } // { dg-prune-output "enable_if" } diff --git a/libstdc++-v3/testsuite/20_util/from_chars/1_neg.cc b/libstdc++-v3/testsuite/20_util/from_chars/1_neg.cc index 3f46b7e7b95..12b5e597b9f 100644 --- a/libstdc++-v3/testsuite/20_util/from_chars/1_neg.cc +++ b/libstdc++-v3/testsuite/20_util/from_chars/1_neg.cc @@ -25,9 +25,11 @@ test01(const char* first, const char* last) { #if _GLIBCXX_USE_WCHAR_T wchar_t wc; +#else + enum W { } wc; +#endif std::from_chars(first, last, wc); // { dg-error "no matching" } std::from_chars(first, last, wc, 10); // { dg-error "no matching" } -#endif char16_t c16; std::from_chars(first, last, c16); // { dg-error "no matching" } @@ -35,6 +37,10 @@ test01(const char* first, const char* last) char32_t c32; std::from_chars(first, last, c32); // { dg-error "no matching" } std::from_chars(first, last, c32, 10); // { dg-error "no matching" } + + enum E { } e; + std::from_chars(first, last, e); // { dg-error "no matching" } + std::from_chars(first, last, e, 10); // { dg-error "no matching" } } // { dg-prune-output "enable_if" }
reply other threads:[~2020-06-24 9:25 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200624092503.A574339874D9@sourceware.org \ --to=marxin@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).