when testing new failure use max for type size_t instead of LONG_MAX

This commit is contained in:
Jeff Hill
2004-05-25 14:45:22 +00:00
parent 50f58c9974
commit 51a1d5991d

View File

@@ -15,8 +15,8 @@
#include <new>
#include <iostream>
#include <limits>
#include <limits.h>
#include <assert.h>
#include <stdio.h>
@@ -44,7 +44,7 @@ static void epicsExceptionTestPrivate ()
{
int excep = false;
try {
new char [LONG_MAX];
new char [numeric_limits<DST_T>::max (size_t)];
assert ( 0 );
}
catch ( const bad_alloc & ) {