use lib "t/testlib";
use strict;
use SPVM 'TestCase';
use SPVM 'TestCase::Operator::New';
my $BYTE_MAX = 127;
my $BYTE_MIN = -128;
my $SHORT_MAX = 32767;
my $SHORT_MIN = -32768;
my $INT_MAX = 2147483647;
my $INT_MIN = -2147483648;
my $LONG_MAX = 9223372036854775807;
my $LONG_MIN = -9223372036854775808;
my $FLOAT_PRECICE = 16384.5;
my $DOUBLE_PRECICE = 65536.5;
# Start objects count
my $api = SPVM::api();
my $start_memory_blocks_count = $api->get_memory_blocks_count();
# Create object
{
# Check object count at least 1 to check object count system itself
{
my $object = SPVM::TestCase->new();
my $memory_blocks_count = $api->get_memory_blocks_count();
ok($memory_blocks_count > 0);
}
}
# new operator
{
ok(SPVM::TestCase::Operator::New->new);
}
# All object is freed
$api->set_exception(undef);
my $end_memory_blocks_count = $api->get_memory_blocks_count();
is($end_memory_blocks_count, $start_memory_blocks_count);
done_testing;