private static void testAllocate()
{
// An IllegalArgumentException will be thrown for negative capacities.
tryCatch((Buffer)null, typeof(ArgumentException), () =>
{
ByteBuffer.Allocate(-1);
});
// LUCENENET: AllocateDirect not implemented
//tryCatch((Buffer)null, typeof(ArgumentException), () =>
//{
// ByteBuffer.AllocateDirect(-1);
//});
// LUCENENET: AllocateDirect not implemented
tryCatch((Buffer)null, typeof(NotImplementedException), () =>
{
ByteBuffer.AllocateDirect(-1);
});
}