class {
use TestCase::Precompile;
use TestCase::NativeAPI2;
use Fn;
our $MOVE_BLOCK_PROGRAM_NAME_ZERO : ro string;
our $MOVE_BLOCK_ARGV_ZERO : ro string[];
INIT {
$MOVE_BLOCK_PROGRAM_NAME_ZERO = CommandInfo->PROGRAM_NAME;
$MOVE_BLOCK_ARGV_ZERO = CommandInfo->ARGV;
}
static method main : void () {
my $program_name = CommandInfo->PROGRAM_NAME;
my $argv = CommandInfo->ARGV;
my $sum = TestCase::Precompile->sum(1, 2);
my $ret1 = TestCase::NativeAPI2->src_foo;
my $ret2 = TestCase::NativeAPI2->src_bar;
my $ret3 = TestCase::Precompile->anon_method_sum;
my $ret4 = TestCase::NativeAPI2->mylib2_source1_func1;
my $global_program_name = CommandInfo->PROGRAM_NAME;
unless ($global_program_name == $program_name) {
die "Wrong";
}
my $global_argv = CommandInfo->ARGV;
unless ($global_argv == $argv) {
die "Wrong";
}
unless ($global_program_name == $MOVE_BLOCK_PROGRAM_NAME_ZERO) {
die "Wrong";
}
unless ($global_argv == $MOVE_BLOCK_ARGV_ZERO) {
die "Wrong";
}
my $basetime = CommandInfo->BASETIME;
my $basetime_ok = 0;
if ($basetime > 0) {
$basetime_ok = 1;
}
print "AAA $program_name $sum $ret1 $ret2 $ret3 $argv->[0] $argv->[1] $basetime_ok\n";
}
}