package TestCase::BitNot {

  sub bit_not_byte : int () {
    my $value = ~(byte)0xFF;
    
    unless ($value isa int) {
      return 0;
    }
    
    unless ($value == 0) {
      return 0;
    }
    
    return 1;
  }

  sub bit_not_short : int () {
    my $value = ~(short)0xFFFF;
    
    unless ($value isa int) {
      return 0;
    }
    
    unless ($value == 0) {
      return 0;
    }
    
    return 1;
  }
  
  sub bit_not_int : int () {
    my $value = ~0xFFFFFFFF;
    
    unless ($value isa int) {
      return 0;
    }
    
    unless ($value == 0) {
      return 0;
    }
    
    return 1;
  }
  
  sub bit_not_int_theory : int () {
    my $num = 28475212;
    my $num_bit_not = ~$num;
    
    unless ($num_bit_not == (-$num) - 1) {
      return 0;
    }
    
    return 1;
  }
  
  sub bit_not_long : int () {
    my $value = ~0xFFFFFFFF_FFFFFFFFL;
    
    unless ($value isa long) {
      return 0;
    }
    
    unless ($value == 0L) {
      return 0;
    }
    
    return 1;
  }
}
