Ticket #1616: PCA-patch-007.patch
File PCA-patch-007.patch, 1.0 KB (added by Paul C. Anagnostopoulos, 11 years ago) |
---|
-
t/op/integer.t
16 16 17 17 =cut 18 18 19 .const int TESTS = 15 219 .const int TESTS = 153 20 20 21 21 .sub 'test' :main 22 22 .include 'test_more.pir' … … 48 48 test_sub_i_i() 49 49 test_set_n() 50 50 test_neg() 51 test_negate_max_integer() 51 52 test_mul_i_i() 52 53 test_null() 53 54 test_div_i_i_by_zero() … … 745 746 is($I0, -3, 'neg_i') 746 747 .end 747 748 749 # Test to ensure that the negative of the maximum integer is equal to the 750 # minimum integer + 1. This should be true because we are assuming a 751 # two's-complement machine. 752 753 .loadlib 'sys_ops' 754 .include 'sysinfo.pasm' 755 756 .sub test_negate_max_integer 757 .local int max 758 .local int min 759 max = sysinfo .SYSINFO_PARROT_INTMAX 760 neg max 761 min = sysinfo .SYSINFO_PARROT_INTMIN 762 inc min 763 is(max, min) 764 .end 765 748 766 .sub 'test_mul_i_i' 749 767 $I0 = 3 750 768 $I1 = 4