gcc/libstdc++-v3/testsuite/18_support/new_delete_placement.cc

41 lines
1.1 KiB
C++
Raw Normal View History

// 2002-07-24 Benjamin Kosnik
9555-ic.cc: Clarify assertion, set test variable to false before assert. 2004-04-19 Benjamin Kosnik <bkoz@redhat.com> * testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc: Clarify assertion, set test variable to false before assert. * testsuite/27_io/basic_istringstream/str/char/1.cc: Same. * testsuite/27_io/basic_stringstream/str/char/1.cc: Same. * testsuite/27_io/ios_base/storage/2.cc: Same. * testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc: Fix function returns. * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc: Same. * testsuite/27_io/fpos/14320-3.cc: Same. * testsuite/27_io/basic_filebuf/2.cc: Instantiate in namespace std. * testsuite/27_io/fpos/1.cc: Same. * testsuite/27_io/basic_stringstream/2.cc: Same. * testsuite/27_io/basic_stringbuf/4.cc: Same. * testsuite/27_io/basic_stringbuf/1.cc: Same. * testsuite/27_io/basic_stringbuf/2.cc: Same. * testsuite/27_io/basic_streambuf/2.cc: Same. * testsuite/27_io/basic_ostringstream/2.cc: Same. * testsuite/27_io/basic_ostream/2.cc: Same. * testsuite/27_io/basic_ofstream/2.cc: Same. * testsuite/27_io/basic_istringstream/2.cc: Same. * testsuite/27_io/basic_istream/2.cc: Same. * testsuite/27_io/basic_iostream/2.cc: Same. * testsuite/27_io/basic_ios/2.cc: Same. * testsuite/27_io/basic_ifstream/2.cc: Same. * testsuite/27_io/basic_fstream/2.cc: Same. * testsuite/ext/stdio_filebuf/char/1.cc: Same, in namespace __gnu_cxx. * testsuite/21_strings/basic_string/capacity/1.cc: Don't compare unsigned against zero. * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Same. * testsuite/21_strings/basic_string/capacity/char/1.cc: Same. * testsuite/18_support/new_delete_placement.cc: Initialize variables before first use. * testsuite/21_strings/char_traits/requirements/wchar_t/1.cc: Same. * testsuite/21_strings/char_traits/requirements/char/1.cc: Same. * testsuite/21_strings/char_traits/requirements/short/1.cc: Same. * testsuite/27_io/basic_istream/seekg/char/exceptions_badbit_throw.cc: Same. * testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_badbit_throw.cc: Same. * testsuite/27_io/basic_ostream/seekp/char/exceptions_badbit_throw.cc: Same. * testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_failbit_throw.cc: Same. * testsuite/27_io/types/2.cc: Same. * testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc: Fix temporary file name. * testsuite/27_io/fpos/14775.cc: Same. From-SVN: r80861
2004-04-19 21:00:09 +02:00
// Copyright (C) 2002, 2004 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// 18.4.1.3 - Placement forms
#include <new>
#include <testsuite_hooks.h>
// libstdc++/7286
void test01()
{
void* pc = new char;
void* pa = new char[10];
9555-ic.cc: Clarify assertion, set test variable to false before assert. 2004-04-19 Benjamin Kosnik <bkoz@redhat.com> * testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc: Clarify assertion, set test variable to false before assert. * testsuite/27_io/basic_istringstream/str/char/1.cc: Same. * testsuite/27_io/basic_stringstream/str/char/1.cc: Same. * testsuite/27_io/ios_base/storage/2.cc: Same. * testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc: Fix function returns. * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc: Same. * testsuite/27_io/fpos/14320-3.cc: Same. * testsuite/27_io/basic_filebuf/2.cc: Instantiate in namespace std. * testsuite/27_io/fpos/1.cc: Same. * testsuite/27_io/basic_stringstream/2.cc: Same. * testsuite/27_io/basic_stringbuf/4.cc: Same. * testsuite/27_io/basic_stringbuf/1.cc: Same. * testsuite/27_io/basic_stringbuf/2.cc: Same. * testsuite/27_io/basic_streambuf/2.cc: Same. * testsuite/27_io/basic_ostringstream/2.cc: Same. * testsuite/27_io/basic_ostream/2.cc: Same. * testsuite/27_io/basic_ofstream/2.cc: Same. * testsuite/27_io/basic_istringstream/2.cc: Same. * testsuite/27_io/basic_istream/2.cc: Same. * testsuite/27_io/basic_iostream/2.cc: Same. * testsuite/27_io/basic_ios/2.cc: Same. * testsuite/27_io/basic_ifstream/2.cc: Same. * testsuite/27_io/basic_fstream/2.cc: Same. * testsuite/ext/stdio_filebuf/char/1.cc: Same, in namespace __gnu_cxx. * testsuite/21_strings/basic_string/capacity/1.cc: Don't compare unsigned against zero. * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Same. * testsuite/21_strings/basic_string/capacity/char/1.cc: Same. * testsuite/18_support/new_delete_placement.cc: Initialize variables before first use. * testsuite/21_strings/char_traits/requirements/wchar_t/1.cc: Same. * testsuite/21_strings/char_traits/requirements/char/1.cc: Same. * testsuite/21_strings/char_traits/requirements/short/1.cc: Same. * testsuite/27_io/basic_istream/seekg/char/exceptions_badbit_throw.cc: Same. * testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_badbit_throw.cc: Same. * testsuite/27_io/basic_ostream/seekp/char/exceptions_badbit_throw.cc: Same. * testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_failbit_throw.cc: Same. * testsuite/27_io/types/2.cc: Same. * testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc: Fix temporary file name. * testsuite/27_io/fpos/14775.cc: Same. From-SVN: r80861
2004-04-19 21:00:09 +02:00
void* tmp = NULL;
operator delete(pc, tmp);
operator delete[](pa, tmp);
}
int main()
{
test01();
return 0;
}