when testing new failure use max for type size_t instead of LONG_MAX
This commit is contained in:
@@ -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 & ) {
|
||||
|
||||
Reference in New Issue
Block a user