package TestCase::Isa {
  use TestCase::Minimal;
  use TestCase::Simple;
  use SPVM::Comparator;
  
  sub isa_match_class : int () {
    my $minimal = TestCase::Minimal->new;
    if ($minimal isa TestCase::Minimal) {
      my $object : object = $minimal;
      if ($object isa TestCase::Minimal) {
        return 1;
      }
    }
    
    return 0;
  }

  sub isa_match_array : int () {
    my $minimals = new TestCase::Minimal[3];
    my $nums = new int[3];
    
    if ($minimals isa TestCase::Minimal[]) {
      if ($nums isa int[]) {
        return 1;
      }
    }
    
    return 0;
  }

  sub isa_not_match_class : int () {
    my $minimal = TestCase::Minimal->new;
    if (!($minimal isa TestCase::Simple)) {
      return 1;
    }
    
    return 0;
  }

  sub isa_not_match_class_undef : int () {
    my $minimal : TestCase::Minimal = undef;
    
    if (!($minimal isa TestCase::Minimal)) {
      return 1;
    }
    
    return 0;
  }

  sub isa_match_interface : int () {
    
    my $comparator = sub : int ($self : self, $object1 : object, $object2 : object) {
      
    };
    if ($comparator isa SPVM::Comparator) {
      my $object : object = $comparator;
      if ($object isa SPVM::Comparator) {
        return 1;
      }
    }
    
    return 0;
  }

  sub isa_not_match_interface_undef : int () {
    my $comparator : SPVM::Comparator;
    
    if (!($comparator isa SPVM::Comparator)) {
      return 1;
    }
    
    return 0;
  }

  sub isa_not_match_interface : int () {
    my $minimal : TestCase::Minimal = TestCase::Minimal->new;
    if (!($minimal isa SPVM::Comparator)) {
      return 1;
    }
    
    return 0;
  }}
