class TestCase::Operator::Seqop {
  static method seqop : int () {
    
    {
      my $ret = (1, 2, 3);
      unless ($ret == 3) {
        return 0;
      }
    }
    
    {
      my $x = 1;
      my $y = 2;
    
      my $ret = ($x += 2, $x + $y);
      unless ($x == 3 && $y == 2 && $ret == 5) {
        return 0;
      }
    }
    
    # Peseud ternary operator
    {
      {
        my $condition = 1;
        my $ret = (my $_ = 0, if ($condition) { $_ = 3; } else { $_ = 5; }, $_);
        unless ($ret == 3) {
          return 0;
        }
      }
      
      {
        my $condition = 0;
        my $ret = (my $_ = 0, if ($condition) { $_ = 3; } else { $_ = 5; }, $_);
        unless ($ret == 5) {
          return 0;
        }
      }
      
    }
    
    # Peseud defined-or operator
    {
      {
        my $left = "foo";
        my $right = "";
        my $ret = (my $_ = (string)undef, if ($left) { $_ = $left; } else { $_ = $right; }, $_);
        unless ($ret eq $left) {
          return 0;
        }
      }
      
      {
        my $left = (string)undef;
        my $right = "";
        my $ret = (my $_ = (string)undef, if ($left) { $_ = $left; } else { $_ = $right; }, $_);
        unless ($ret eq $right) {
          return 0;
        }
      }
      
    }
    
    return 1;
  }
}
