mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:12:58 +00:00
Add .gitattributes and .gitignore files and normalize line endings in the repository (#10)
This commit is contained in:
parent
c609406c2f
commit
9ebf43567d
309 changed files with 66975 additions and 66873 deletions
120
sdk/lib/3rdparty/stlport/test/compiler/eh.cc
vendored
120
sdk/lib/3rdparty/stlport/test/compiler/eh.cc
vendored
|
@ -1,60 +1,60 @@
|
|||
#include <list> /* required, to expose allocator */
|
||||
#include <stdexcept>
|
||||
#include <stdio.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
struct BigStruct
|
||||
{
|
||||
char _data[4096];
|
||||
};
|
||||
|
||||
void bad_alloc_test()
|
||||
{
|
||||
typedef allocator<BigStruct> BigStructAllocType;
|
||||
BigStructAllocType bigStructAlloc;
|
||||
|
||||
try {
|
||||
//Lets try to allocate almost 4096 Go (on most of the platforms) of memory:
|
||||
BigStructAllocType::pointer pbigStruct = bigStructAlloc.allocate(1024 * 1024 * 1024);
|
||||
|
||||
// CPPUNIT_ASSERT( pbigStruct != 0 && "Allocation failed but no exception thrown" );
|
||||
}
|
||||
catch (bad_alloc const&) {
|
||||
printf( "Ok\n" );
|
||||
}
|
||||
catch (...) {
|
||||
//We shouldn't be there:
|
||||
// CPPUNIT_ASSERT( false && "Not bad_alloc exception thrown." );
|
||||
}
|
||||
}
|
||||
|
||||
void bad_alloc_test1()
|
||||
{
|
||||
try {
|
||||
allocator<BigStruct> all;
|
||||
BigStruct *bs = all.allocate(1024*1024*1024);
|
||||
|
||||
// throw bad_alloc();
|
||||
}
|
||||
catch ( bad_alloc const & ) {
|
||||
printf( "I am here\n" );
|
||||
}
|
||||
catch ( ... ) {
|
||||
}
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
bad_alloc_test();
|
||||
#if 0
|
||||
try {
|
||||
throw bad_alloc();
|
||||
}
|
||||
catch ( bad_alloc& ) {
|
||||
}
|
||||
catch ( ... ) {
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
#include <list> /* required, to expose allocator */
|
||||
#include <stdexcept>
|
||||
#include <stdio.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
struct BigStruct
|
||||
{
|
||||
char _data[4096];
|
||||
};
|
||||
|
||||
void bad_alloc_test()
|
||||
{
|
||||
typedef allocator<BigStruct> BigStructAllocType;
|
||||
BigStructAllocType bigStructAlloc;
|
||||
|
||||
try {
|
||||
//Lets try to allocate almost 4096 Go (on most of the platforms) of memory:
|
||||
BigStructAllocType::pointer pbigStruct = bigStructAlloc.allocate(1024 * 1024 * 1024);
|
||||
|
||||
// CPPUNIT_ASSERT( pbigStruct != 0 && "Allocation failed but no exception thrown" );
|
||||
}
|
||||
catch (bad_alloc const&) {
|
||||
printf( "Ok\n" );
|
||||
}
|
||||
catch (...) {
|
||||
//We shouldn't be there:
|
||||
// CPPUNIT_ASSERT( false && "Not bad_alloc exception thrown." );
|
||||
}
|
||||
}
|
||||
|
||||
void bad_alloc_test1()
|
||||
{
|
||||
try {
|
||||
allocator<BigStruct> all;
|
||||
BigStruct *bs = all.allocate(1024*1024*1024);
|
||||
|
||||
// throw bad_alloc();
|
||||
}
|
||||
catch ( bad_alloc const & ) {
|
||||
printf( "I am here\n" );
|
||||
}
|
||||
catch ( ... ) {
|
||||
}
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
bad_alloc_test();
|
||||
#if 0
|
||||
try {
|
||||
throw bad_alloc();
|
||||
}
|
||||
catch ( bad_alloc& ) {
|
||||
}
|
||||
catch ( ... ) {
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue