class TestCase::Statement::IfRequire {
static method if_require : int () {
# if require success
{
my $foo = 0;
my $int32_max = 0;
if (require Fn) {
$int32_max = Fn->INT32_MAX;
$foo = 1;
}
unless ($foo == 1) {
return 0;
}
unless ($int32_max == Fn->INT32_MAX) {
return 0;
}
}
# if require not success
{
my $foo = 0;
if (require NotExistsXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX) {
NotExistsXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX->new;
new NotExistsXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX;
$foo = 1;
}
unless ($foo == 0) {
return 0;
}
}
# if require else success
{
my $foo = 0;
if (require Fn) {
$foo = 1;
}
else {
$foo = 2;
}
unless ($foo == 1) {
return 0;
}
}
# if require else not success
{
my $foo = 0;
if (require NotExistsXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX) {
new NotExistsXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX;
$foo = 1;
}
else {
$foo = 2;
}
unless ($foo == 2) {
return 0;
}
}
return 1;
}
}