Return-Path: Delivered-To: apmail-stdcxx-commits-archive@www.apache.org Received: (qmail 22333 invoked from network); 14 Apr 2008 10:46:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Apr 2008 10:46:33 -0000 Received: (qmail 36817 invoked by uid 500); 14 Apr 2008 10:46:34 -0000 Delivered-To: apmail-stdcxx-commits-archive@stdcxx.apache.org Received: (qmail 36795 invoked by uid 500); 14 Apr 2008 10:46:33 -0000 Mailing-List: contact commits-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list commits@stdcxx.apache.org Received: (qmail 36786 invoked by uid 99); 14 Apr 2008 10:46:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Apr 2008 03:46:33 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Apr 2008 10:45:50 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 455EF1A9832; Mon, 14 Apr 2008 03:46:10 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r647729 - /stdcxx/trunk/tests/self/0.char.cpp Date: Mon, 14 Apr 2008 10:46:08 -0000 To: commits@stdcxx.apache.org From: faridz@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080414104610.455EF1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: faridz Date: Mon Apr 14 03:46:07 2008 New Revision: 647729 URL: http://svn.apache.org/viewvc?rev=647729&view=rev Log: 2008-04-14 Farid Zaripov STDXX-862 * tests/self/0.char.cpp (test_rw_widen): Use UserTraits::compare() instead of memcmp() to avoid false assertions due to possibly different binary representation of (long double)0 and (long double)0. on Sun C++ 5.9 / Linux. Modified: stdcxx/trunk/tests/self/0.char.cpp Modified: stdcxx/trunk/tests/self/0.char.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/self/0.char.cpp?rev=647729&r1=647728&r2=647729&view=diff ============================================================================== --- stdcxx/trunk/tests/self/0.char.cpp (original) +++ stdcxx/trunk/tests/self/0.char.cpp Mon Apr 14 03:46:07 2008 @@ -467,6 +467,8 @@ { 0, '\0' } }; + typedef UserTraits Traits; + UserChar udst [nsrc + 1]; for (size_t i = 0; i != nsrc + 1; ++i) { @@ -480,7 +482,7 @@ "rw_widen(UserChar*, %{#s}%{?}, %zu%{;})", src, i < nsrc, i); - rw_assert ( 0 == memcmp (udst, usrc, i * sizeof *udst) + rw_assert ( 0 == Traits::compare (udst, usrc, i) && 0 == udst [i].f && 0 == udst [i].c, 0, __LINE__, "rw_widen(UserChar*, %{#s}%{?}, %zu%{;})", @@ -490,7 +492,7 @@ memset (udst, 1, sizeof udst); rw_widen (udst, 0, sizeof udst / sizeof *udst); - rw_assert (0 == memcmp (udst, unull, sizeof udst), 0, __LINE__, + rw_assert (0 == Traits::compare (udst, unull, nsrc + 1), 0, __LINE__, "rw_widen(UserChar*, %{#s}, %zu)", 0, sizeof udst, int (sizeof udst), wnull); }