From stdcxx-commits-return-662-apmail-incubator-stdcxx-commits-archive=incubator.apache.org@incubator.apache.org Fri May 05 00:43:47 2006 Return-Path: Delivered-To: apmail-incubator-stdcxx-commits-archive@www.apache.org Received: (qmail 96840 invoked from network); 5 May 2006 00:43:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 May 2006 00:43:47 -0000 Received: (qmail 56352 invoked by uid 500); 5 May 2006 00:43:47 -0000 Delivered-To: apmail-incubator-stdcxx-commits-archive@incubator.apache.org Received: (qmail 56340 invoked by uid 500); 5 May 2006 00:43:47 -0000 Mailing-List: contact stdcxx-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-commits@incubator.apache.org Received: (qmail 56329 invoked by uid 99); 5 May 2006 00:43:47 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 May 2006 17:43:47 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 04 May 2006 17:43:46 -0700 Received: (qmail 96797 invoked by uid 65534); 5 May 2006 00:43:25 -0000 Message-ID: <20060505004325.96796.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r399899 - in /incubator/stdcxx/trunk/tests/strings: 21.string.append.cpp 21.string.assign.cpp 21.string.copy.cpp 21.string.insert.cpp 21.string.op.plus.equal.cpp 21.string.replace.cpp Date: Fri, 05 May 2006 00:43:24 -0000 To: stdcxx-commits@incubator.apache.org From: sebor@apache.org X-Mailer: svnmailer-1.0.8 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: sebor Date: Thu May 4 17:43:21 2006 New Revision: 399899 URL: http://svn.apache.org/viewcvs?rev=399899&view=rev Log: 2006-05-04 Martin Sebor * 21.string.append.cpp (test_append): Corrected compilation errors when _RWSTD_NO_EXCEPTIONS is #defined and verified with gcc -fno-exceptions. * 21.string.assign.cpp (test_assign): Same. * 21.string.copy.cpp (test_assign): Same. * 21.string.insert.cpp (test_insert): Same. * 21.string.plus_equal.cpp (test_op_plus_eq): Same. * 21.string.replace.cpp (test_replace): Same. Modified: incubator/stdcxx/trunk/tests/strings/21.string.append.cpp incubator/stdcxx/trunk/tests/strings/21.string.assign.cpp incubator/stdcxx/trunk/tests/strings/21.string.copy.cpp incubator/stdcxx/trunk/tests/strings/21.string.insert.cpp incubator/stdcxx/trunk/tests/strings/21.string.op.plus.equal.cpp incubator/stdcxx/trunk/tests/strings/21.string.replace.cpp Modified: incubator/stdcxx/trunk/tests/strings/21.string.append.cpp URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/tests/strings/21.string.append.cpp?rev=399899&r1=399898&r2=399899&view=diff ============================================================================== --- incubator/stdcxx/trunk/tests/strings/21.string.append.cpp (original) +++ incubator/stdcxx/trunk/tests/strings/21.string.append.cpp Thu May 4 17:43:21 2006 @@ -544,10 +544,12 @@ # endif // _RWSTD_NO_REPLACEABLE_NEW_DELETE #endif // _RWSTD_NO_EXCEPTIONS + // (name of) expected and caught exception + const char* expected = 0; + const char* caught = 0; + #ifndef _RWSTD_NO_EXCEPTIONS - // is some exception expected? - const char* expected = 0; if (1 == tcase.bthrow && Append (str_size_size) == which) expected = exceptions [1]; // out_of_range else if (2 == tcase.bthrow) @@ -555,8 +557,6 @@ else if (-1 == tcase.bthrow) expected = exceptions [3]; // bad_alloc - const char* caught = 0; - #else // if defined (_RWSTD_NO_EXCEPTIONS) if (tcase.bthrow) @@ -720,9 +720,8 @@ # endif // _RWSTD_NO_REPLACEABLE_NEW_DELETE #else // if defined (_RWSTD_NO_EXCEPTIONS) - _RWSTD_UNUSED (size); - _RWSTD_UNUSED (capacity); _RWSTD_UNUSED (throw_after); + _RWSTD_UNUSED (pst); #endif // _RWSTD_NO_EXCEPTIONS Modified: incubator/stdcxx/trunk/tests/strings/21.string.assign.cpp URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/tests/strings/21.string.assign.cpp?rev=399899&r1=399898&r2=399899&view=diff ============================================================================== --- incubator/stdcxx/trunk/tests/strings/21.string.assign.cpp (original) +++ incubator/stdcxx/trunk/tests/strings/21.string.assign.cpp Thu May 4 17:43:21 2006 @@ -545,10 +545,12 @@ # endif // _RWSTD_NO_REPLACEABLE_NEW_DELETE #endif // _RWSTD_NO_EXCEPTIONS + // (name of) expected and caught exception + const char* expected = 0; + const char* caught = 0; + #ifndef _RWSTD_NO_EXCEPTIONS - // is some exception expected ? - const char* expected = 0; if (1 == tcase.bthrow && Assign (str_size_size) == which) expected = exceptions [1]; // out_of_range if (2 == tcase.bthrow) @@ -556,8 +558,6 @@ if (-1 == tcase.bthrow) expected = exceptions [3]; // bad_alloc - const char* caught = 0; - #else // if defined (_RWSTD_NO_EXCEPTIONS) if (tcase.bthrow) @@ -721,8 +721,7 @@ # endif // _RWSTD_NO_REPLACEABLE_NEW_DELETE #else // if defined (_RWSTD_NO_EXCEPTIONS) - _RWSTD_UNUSED (ssize); - _RWSTD_UNUSED (capacity); + _RWSTD_UNUSED (pst); _RWSTD_UNUSED (throw_after); #endif // _RWSTD_NO_EXCEPTIONS Modified: incubator/stdcxx/trunk/tests/strings/21.string.copy.cpp URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/tests/strings/21.string.copy.cpp?rev=399899&r1=399898&r2=399899&view=diff ============================================================================== --- incubator/stdcxx/trunk/tests/strings/21.string.copy.cpp (original) +++ incubator/stdcxx/trunk/tests/strings/21.string.copy.cpp Thu May 4 17:43:21 2006 @@ -175,12 +175,13 @@ charT wcgb = make_char (cgb, (charT*)0); Traits::assign (s_res, min_len + 1, wcgb); + // (name of) expected and caught exception + const char* expected = 0; + const char* caught = 0; + #ifndef _RWSTD_NO_EXCEPTIONS - // is some exception expected? - const char* const expected = - cs.bthrow && use_pos ? exp_exceptions [1] : 0; - const char* caught = 0; + expected = cs.bthrow && use_pos ? exp_exceptions [1] : 0; try { @@ -228,7 +229,7 @@ } #else // if defined (_RWSTD_NO_EXCEPTIONS) - _RWSTD_UNUSED (should_throw); + #endif // _RWSTD_NO_EXCEPTIONS rw_assert (caught == expected, 0, cs.line, Modified: incubator/stdcxx/trunk/tests/strings/21.string.insert.cpp URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/tests/strings/21.string.insert.cpp?rev=399899&r1=399898&r2=399899&view=diff ============================================================================== --- incubator/stdcxx/trunk/tests/strings/21.string.insert.cpp (original) +++ incubator/stdcxx/trunk/tests/strings/21.string.insert.cpp Thu May 4 17:43:21 2006 @@ -572,8 +572,6 @@ typedef typename UserTraits::MemFun UTMemFun; - const bool use_iters = (Insert (val) <= which); - static charT wstr [LLEN]; static charT warg [LLEN]; @@ -629,10 +627,14 @@ # endif // _RWSTD_NO_REPLACEABLE_NEW_DELETE #endif // _RWSTD_NO_EXCEPTIONS + // (name of) expected and caught exception + const char* expected = 0; + const char* caught = 0; + #ifndef _RWSTD_NO_EXCEPTIONS - // is some exception expected ? - const char* expected = 0; + const bool use_iters = (Insert (val) <= which); + if (1 == tcase.bthrow && !use_iters) expected = exceptions [1]; // out_of_range if (2 == tcase.bthrow && Insert (size_str_size_size) == which) @@ -642,7 +644,10 @@ if (-1 == tcase.bthrow) expected = exceptions [3]; // bad_alloc - const char* caught = 0; +#else // if defined (_RWSTD_NO_EXCEPTIONS) + + if (tcase.bthrow) + return; #endif // _RWSTD_NO_EXCEPTIONS @@ -818,8 +823,7 @@ # endif // _RWSTD_NO_REPLACEABLE_NEW_DELETE #else // if defined (_RWSTD_NO_EXCEPTIONS) - _RWSTD_UNUSED (size); - _RWSTD_UNUSED (capacity); + _RWSTD_UNUSED (pst); _RWSTD_UNUSED (throw_after); #endif // _RWSTD_NO_EXCEPTIONS Modified: incubator/stdcxx/trunk/tests/strings/21.string.op.plus.equal.cpp URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/tests/strings/21.string.op.plus.equal.cpp?rev=399899&r1=399898&r2=399899&view=diff ============================================================================== --- incubator/stdcxx/trunk/tests/strings/21.string.op.plus.equal.cpp (original) +++ incubator/stdcxx/trunk/tests/strings/21.string.op.plus.equal.cpp Thu May 4 17:43:21 2006 @@ -279,17 +279,17 @@ # endif // _RWSTD_NO_REPLACEABLE_NEW_DELETE #endif // _RWSTD_NO_EXCEPTIONS + // (name of) expected and caught exception + const char* expected = 0; + const char* caught = 0; + #ifndef _RWSTD_NO_EXCEPTIONS - // is some exception expected ? - const char* expected = 0; if (1 == tcase.bthrow) expected = exceptions [2]; // length_error if (-1 == tcase.bthrow) expected = exceptions [3]; // bad_alloc - const char* caught = 0; - #else // if defined (_RWSTD_NO_EXCEPTIONS) if (tcase.bthrow) @@ -432,8 +432,7 @@ # endif // _RWSTD_NO_REPLACEABLE_NEW_DELETE #else // if defined (_RWSTD_NO_EXCEPTIONS) - _RWSTD_UNUSED (size); - _RWSTD_UNUSED (capacity); + _RWSTD_UNUSED (pst); _RWSTD_UNUSED (throw_after); #endif // _RWSTD_NO_EXCEPTIONS Modified: incubator/stdcxx/trunk/tests/strings/21.string.replace.cpp URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/tests/strings/21.string.replace.cpp?rev=399899&r1=399898&r2=399899&view=diff ============================================================================== --- incubator/stdcxx/trunk/tests/strings/21.string.replace.cpp (original) +++ incubator/stdcxx/trunk/tests/strings/21.string.replace.cpp Thu May 4 17:43:21 2006 @@ -752,10 +752,12 @@ # endif // _RWSTD_NO_REPLACEABLE_NEW_DELETE #endif // _RWSTD_NO_EXCEPTIONS + // (name of) expected and caught exception + const char* expected = 0; + const char* caught = 0; + #ifndef _RWSTD_NO_EXCEPTIONS - // is some exception expected ? - const char* expected = 0; if (1 == tcase.bthrow && !use_iters) expected = exceptions [1]; // out_of_range if (2 == tcase.bthrow && Replace (size_size_str_size_size) == which) @@ -765,8 +767,6 @@ if (-1 == tcase.bthrow) expected = exceptions [3]; // bad_alloc - const char* caught = 0; - #else // if defined (_RWSTD_NO_EXCEPTIONS) if (tcase.bthrow) @@ -967,8 +967,7 @@ # endif // _RWSTD_NO_REPLACEABLE_NEW_DELETE #else // if defined (_RWSTD_NO_EXCEPTIONS) - _RWSTD_UNUSED (ssize); - _RWSTD_UNUSED (capacity); + _RWSTD_UNUSED (pst); _RWSTD_UNUSED (throw_after); #endif // _RWSTD_NO_EXCEPTIONS