From stdcxx-commits-return-1928-apmail-incubator-stdcxx-commits-archive=incubator.apache.org@incubator.apache.org Sun Oct 14 23:05:42 2007 Return-Path: Delivered-To: apmail-incubator-stdcxx-commits-archive@www.apache.org Received: (qmail 76181 invoked from network); 14 Oct 2007 23:05:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Oct 2007 23:05:42 -0000 Received: (qmail 10934 invoked by uid 500); 14 Oct 2007 23:05:30 -0000 Delivered-To: apmail-incubator-stdcxx-commits-archive@incubator.apache.org Received: (qmail 10917 invoked by uid 500); 14 Oct 2007 23:05:30 -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 10906 invoked by uid 99); 14 Oct 2007 23:05:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Oct 2007 16:05:30 -0700 X-ASF-Spam-Status: No, hits=-100.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; Sun, 14 Oct 2007 23:05:41 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 2B7021A9832; Sun, 14 Oct 2007 16:04:51 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r584633 - /incubator/stdcxx/trunk/tests/regress/26.valarray.sub.stdcxx-224.cpp Date: Sun, 14 Oct 2007 23:04:50 -0000 To: stdcxx-commits@incubator.apache.org From: sebor@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071014230451.2B7021A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sebor Date: Sun Oct 14 16:04:49 2007 New Revision: 584633 URL: http://svn.apache.org/viewvc?rev=584633&view=rev Log: 2007-10-14 Martin Sebor * 26.valarray.sub.stdcxx-224.cpp: Added regression test for STDCXX-224. Added: incubator/stdcxx/trunk/tests/regress/26.valarray.sub.stdcxx-224.cpp (with props) Added: incubator/stdcxx/trunk/tests/regress/26.valarray.sub.stdcxx-224.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/regress/26.valarray.sub.stdcxx-224.cpp?rev=584633&view=auto ============================================================================== --- incubator/stdcxx/trunk/tests/regress/26.valarray.sub.stdcxx-224.cpp (added) +++ incubator/stdcxx/trunk/tests/regress/26.valarray.sub.stdcxx-224.cpp Sun Oct 14 16:04:49 2007 @@ -0,0 +1,44 @@ +/************************************************************************ + * + * 26.valarray.sub.stdcxx-224.cpp - regression test for STDCXX-224 + * http://issues.apache.org/jira/browse/STDCXX-224 + * + * $Id$ + * + *************************************************************************** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + * + **************************************************************************/ + +#include +#include +#include + +int main () +{ + const int vals[] = { 1, 0 }; + const std::size_t N = sizeof vals / sizeof *vals; + + const std::valarray p (vals, N); + + assert (N == p.size ()); + + const std::valarray r = p [std::slice (0, 0, 1)]; + + assert (0 == r.size ()); +} Propchange: incubator/stdcxx/trunk/tests/regress/26.valarray.sub.stdcxx-224.cpp ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/stdcxx/trunk/tests/regress/26.valarray.sub.stdcxx-224.cpp ------------------------------------------------------------------------------ svn:keywords = Id