Author: faridz
Date: Fri Oct 26 11:13:40 2007
New Revision: 588730
URL: http://svn.apache.org/viewvc?rev=588730&view=rev
Log:
2007-10-26 Travis Vitek <[EMAIL PROTECTED]>
* 23.vector.stdcxx-611.cpp: The regression test for STDCXX-611.
Added:
incubator/stdcxx/branches/4.2.x/tests/regress/23.vector.stdcxx-611.cpp
(with props)
Added: incubator/stdcxx/branches/4.2.x/tests/regress/23.vector.stdcxx-611.cpp
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.x/tests/regress/23.vector.stdcxx-611.cpp?rev=588730&view=auto
==============================================================================
--- incubator/stdcxx/branches/4.2.x/tests/regress/23.vector.stdcxx-611.cpp
(added)
+++ incubator/stdcxx/branches/4.2.x/tests/regress/23.vector.stdcxx-611.cpp Fri
Oct 26 11:13:40 2007
@@ -0,0 +1,74 @@
+/************************************************************************
+ *
+ * 23.vector.stdcxx-611.cpp - regression test for STDCXX-611
+ *
+ * https://issues.apache.org/jira/browse/STDCXX-611
+ *
+ * $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 <vector> // for vector
+
+struct S
+{
+ void operator& () const {};
+};
+
+void test ()
+{
+ const S s [3];
+
+ std::vector<S> v;
+
+ v.assign (1, s [0]);
+ v.assign (s, s+3);
+ v.at (0);
+ v.back ();
+ v.begin ();
+ v.capacity ();
+ v.empty ();
+ v.end ();
+ v.front ();
+ v.insert (v.begin (), s [0]);
+ v.insert (v.begin (), s, s+3);
+ v.insert (v.begin (), 2, s [0]);
+ v.erase (v.begin ());
+ v.erase (v.begin (), v.end ());
+ v.max_size ();
+ v.pop_back ();
+ v.push_back (s[0]);
+ v.rbegin ();
+ v.rend ();
+ v.reserve (10);
+ v.resize (10);
+ v.size ();
+ std::vector<S>().swap (v);
+}
+
+int main (int argc, char**)
+{
+ // this is just a compile test, it is not intended to run
+ if (1 < argc)
+ test ();
+
+ return 0;
+}
Propchange:
incubator/stdcxx/branches/4.2.x/tests/regress/23.vector.stdcxx-611.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/stdcxx/branches/4.2.x/tests/regress/23.vector.stdcxx-611.cpp
------------------------------------------------------------------------------
svn:keywords = Id