C# Class Clojure.Tests.LibTests.BigIntegerTests

Inheritance: NUnit.Framework.AssertionHelper
Show file Open project: richhickey/clojure-clr

Public Methods

Method Description
BitNot_neg ( ) : void
Compare_neg_pos_is_minus1 ( ) : void
Compare_negs_larger_len_first_is_minus1 ( ) : void
Compare_negs_smaller_len_first_is_plus1 ( ) : void
Compare_pos_larger_len_first_is_plus1 ( ) : void
Compare_pos_neg_is_plus1 ( ) : void
Compare_pos_smaller_len_first_is_minus1 ( ) : void
Compare_same_is_0 ( ) : void
Compare_same_len_larger_first_diff_in_LSB_is_plus1 ( ) : void
Compare_same_len_larger_first_diff_in_MSB_is_plus1 ( ) : void
Compare_same_len_larger_first_diff_in_middle_is_plus1 ( ) : void
Compare_same_len_smaller_first_diff_in_LSB_is_minus1 ( ) : void
Compare_same_len_smaller_first_diff_in_MSB_is_minus1 ( ) : void
Compare_same_len_smaller_first_diff_in_middle_is_minus1 ( ) : void
LeftShift_neg_big_shift ( ) : void
LeftShift_neg_small_shift ( ) : void
LeftShift_neg_whole_digit_shift_adds_zeros_at_end ( ) : void
LeftShift_pos_big_shift ( ) : void
LeftShift_pos_big_shift_zero_high_bits ( ) : void
LeftShift_pos_small_shift ( ) : void
LeftShift_pos_whole_digit_shift_adds_zeros_at_end ( ) : void
RightShift_neg_big_shift ( ) : void
RightShift_neg_small_shift ( ) : void
RightShift_neg_whole_digit_shift_loses_whole_digits ( ) : void
RightShift_pos_big_shift ( ) : void
RightShift_pos_big_shift_zero_high_bits ( ) : void
RightShift_pos_small_shift ( ) : void
RightShift_pos_whole_digit_shift_loses_whole_digits ( ) : void
TestGDC ( int primes, bool apos, int apowers, bool bpos, int bpowers ) : void

Private Methods

Method Description
Abs_neg_is_pos ( ) : void
Abs_pos_is_pos ( ) : void
Abs_zero_is_zero ( ) : void
Add_neg_pos_first_larger_mag ( ) : void
Add_neg_pos_same_mag ( ) : void
Add_neg_pos_second_larger_mag ( ) : void
Add_neg_same_length_no_carry ( ) : void
Add_neg_same_length_some_carry ( ) : void
Add_pos_first_longer_carry_extend ( ) : void
Add_pos_first_longer_more_carry ( ) : void
Add_pos_first_longer_one_carry ( ) : void
Add_pos_neg_first_larger_mag ( ) : void
Add_pos_neg_same_mag ( ) : void
Add_pos_neg_second_larger_mag ( ) : void
Add_pos_same_length_no_carry ( ) : void
Add_pos_same_length_some_carry ( ) : void
Add_zero_to_pos ( ) : void
AsDecimalTest ( BigInteger i, bool expRet, decimal expDec ) : void
AsDecimal_various ( ) : void
AsInt32Test ( BigInteger i, bool expRet, int expInt ) : void
AsInt32_various ( ) : void
AsInt64Test ( BigInteger i, bool expRet, long expInt ) : void
AsInt64_various ( ) : void
AsUInt32Test ( BigInteger i, bool expRet, uint expInt ) : void
AsUInt32_various ( ) : void
AsUInt64Test ( BigInteger i, bool expRet, ulong expInt ) : void
AsUInt64_various ( ) : void
BI_basic_ctor_detects_all_zero_mag ( ) : void
BI_basic_ctor_fails_on_bad_sign_neg ( ) : void
BI_basic_ctor_fails_on_bad_sign_pos ( ) : void
BI_basic_ctor_fails_on_null_mag ( ) : void
BI_basic_ctor_fails_on_zero_sign_on_nonzero_mag ( ) : void
BI_basic_ctor_handles_basic_data_negative ( ) : void
BI_basic_ctor_handles_basic_data_positive ( ) : void
BI_basic_ctor_handles_zero ( ) : void
BI_basic_ctor_normalized_magnitude ( ) : void
BI_copy_ctor_works ( ) : void
BitAndNot_neg_neg ( ) : void
BitAndNot_neg_pos ( ) : void
BitAndNot_pos_neg ( ) : void
BitAndNot_pos_pos ( ) : void
BitAnd_neg_neg ( ) : void
BitAnd_neg_pos ( ) : void
BitAnd_pos_neg ( ) : void
BitAnd_pos_pos ( ) : void
BitNot_pos ( ) : void
BitOr_neg_neg ( ) : void
BitOr_neg_pos ( ) : void
BitOr_pos_neg ( ) : void
BitOr_pos_pos ( ) : void
BitXor_neg_neg ( ) : void
BitXor_neg_pos ( ) : void
BitXor_pos_neg ( ) : void
BitXor_pos_pos ( ) : void
ClearBit_neg_inside_initial_clear ( ) : void
ClearBit_neg_inside_initial_set ( ) : void
ClearBit_neg_outside ( ) : void
ClearBit_pos_inside_initial_clear ( ) : void
ClearBit_pos_inside_initial_set ( ) : void
ClearBit_pos_outside ( ) : void
Compare_on_zeros_is_0 ( ) : void
CreateFromPrimePowers ( int primes, int powers ) : BigInteger
Create_decimal_various ( ) : void
Create_double_fails_on_NaN ( ) : void
Create_double_fails_on_neg_infinity ( ) : void
Create_double_fails_on_pos_infinity ( ) : void
Create_double_powers_of_two ( ) : void
Create_double_various ( ) : void
Create_int_various ( ) : void
Create_long_various ( ) : void
Create_uint_various ( ) : void
Create_ulong_various ( ) : void
Divide_by_zero_throws ( ) : void
Divide_into_smaller_is_zero_plus_remainder_is_dividend ( ) : void
Divide_into_smaller_is_zero_plus_remainder_is_dividend_len_difference ( ) : void
Divide_into_zero_is_zero ( ) : void
Divide_same_except_small_remainder ( ) : void
Divide_same_except_small_remainder_2 ( ) : void
Divide_same_on_len_1 ( ) : void
Divide_same_on_len_3 ( ) : void
Divide_two_digits_with_small_remainder_no_shift ( ) : void
Divide_two_digits_with_small_remainder_no_shift2 ( ) : void
Divide_two_digits_with_small_remainder_small_shift ( ) : void
Equals_BI_on_different_is_false ( ) : void
Equals_BI_on_null_is_false ( ) : void
Equals_BI_on_same_is_true ( ) : void
FlipBit_neg_inside_initial_clear ( ) : void
FlipBit_neg_inside_initial_set ( ) : void
FlipBit_neg_outside ( ) : void
FlipBit_pos_inside_initial_clear ( ) : void
FlipBit_pos_inside_initial_set ( ) : void
FlipBit_pos_outside ( ) : void
GDC_simple_case ( ) : void
GDC_test_disparity_in_size ( ) : void
GDC_test_many_powers_of_two ( ) : void
GDC_test_multiple ( ) : void
GDC_test_relatively_prime ( ) : void
GDC_test_signs ( ) : void
GenerateKnuthExample ( int m, int n, BigInteger &bmn, BigInteger &bm, BigInteger &bn ) : void
IsNegative_works ( ) : void
IsOddWorks ( ) : void
IsPositive_works ( ) : void
IsZero_works ( ) : void
LeftShift_neg_shift_same_as_right_shift ( ) : void
LeftShift_zero_is_zero ( ) : void
LeftShift_zero_shift_is_this ( ) : void
Magnitude_is_same_for_pos_and_neg ( ) : void
Magnitude_is_zero_length_for_zero ( ) : void
MinPowers ( int apowers, int bpowers ) : int[]
ModPow_on_completely_odd_exponent_works ( ) : void
ModPow_on_negative_exponent_fails ( ) : void
ModPow_on_power_of_two_exponent_works ( ) : void
ModPow_on_small_exponent_works ( ) : void
ModPow_on_zero_is_zero ( ) : void
ModPow_with_exponent_0_is_one ( ) : void
Mult_1 ( ) : void
Mult_2 ( ) : void
Mult_3 ( ) : void
Mult_neg_pos_is_neg ( ) : void
Mult_pos_neg_is_neg ( ) : void
Mult_two_neg_is_pos ( ) : void
Mult_two_pos_is_pos ( ) : void
Mult_x_by_zero_is_zero ( ) : void
Mult_zero_by_y_is_zero ( ) : void
Negate_negative_is_same_mag_pos ( ) : void
Negate_positive_is_same_mag_neg ( ) : void
Negate_zero_is_zero ( ) : void
Normalize_shifts_happens_different_len ( ) : void
Normalize_shifts_happens_same_len ( ) : void
Normalize_shifts_over_left_end_throws ( ) : void
Parse_adjacent_hyphens_fails ( ) : void
Parse_detects_radix_too_large ( ) : void
Parse_detects_radix_too_small ( ) : void
Parse_fails_on_bogus_char ( ) : void
Parse_fails_on_digit_out_of_range_base_16 ( ) : void
Parse_fails_on_digit_out_of_range_base_2 ( ) : void
Parse_fails_on_digit_out_of_range_base_8 ( ) : void
Parse_fails_on_digit_out_of_range_in_later_super_digit_base_16 ( ) : void
Parse_hyphen_only_fails ( ) : void
Parse_just_adjacent_hyphens_fails ( ) : void
Parse_multiple_hyphens_fails ( ) : void
Parse_multiple_zeros_is_zero ( ) : void
Parse_multiple_zeros_with_leading_minus_is_zero ( ) : void
Parse_negative_zero_just_zero ( ) : void
Parse_simple_base_10 ( ) : void
Parse_simple_base_16 ( ) : void
Parse_simple_base_2 ( ) : void
Parse_simple_base_36 ( ) : void
Parse_works_on_long_string_base_10 ( ) : void
Parse_works_on_long_string_base_10_2 ( ) : void
Parse_works_on_long_string_base_16 ( ) : void
Parse_works_with_leading_minus_sign ( ) : void
Parse_works_with_leading_plus_sign ( ) : void
Parse_zero ( ) : void
Power_on_completely_odd_exponent_works ( ) : void
Power_on_negative_exponent_fails ( ) : void
Power_on_power_of_two_exponent_works ( ) : void
Power_on_small_exponent_works ( ) : void
Power_on_zero_is_zero ( ) : void
Power_with_exponent_0_is_one ( ) : void
PrecisionBoundaryCase2 ( ) : void
PrecisionBoundaryCases ( ) : void
PrecisionSingleDigitsIsOne ( ) : void
PrecisionThreeDigitsIsThree ( ) : void
PrecisionTwoDigitsIsTwo ( ) : void
RightShift_neg_shift_same_as_left_shift ( ) : void
RightShift_zero_is_zero ( ) : void
RightShift_zero_shift_is_this ( ) : void
SameMag ( uint xs, uint ys ) : bool
SameSign ( int s1, int s2 ) : bool
SameValue ( BigInteger i, int sign, uint mag ) : bool
SetBit_neg_inside_initial_clear ( ) : void
SetBit_neg_inside_initial_set ( ) : void
SetBit_neg_outside ( ) : void
SetBit_pos_inside_initial_clear ( ) : void
SetBit_pos_inside_initial_set ( ) : void
SetBit_pos_outside ( ) : void
Signum_is_1_for_negative ( ) : void
Signum_is_m1_for_negative ( ) : void
Signum_is_zero_for_zero ( ) : void
Subtract_both_neg_first_larger_no_borrow ( ) : void
Subtract_both_neg_first_smaller_no_borrow ( ) : void
Subtract_both_pos_first_larger_lose_MSB ( ) : void
Subtract_both_pos_first_larger_lose_several_MSB ( ) : void
Subtract_both_pos_first_larger_no_borrow ( ) : void
Subtract_both_pos_first_larger_some_borrow ( ) : void
Subtract_both_pos_first_smaller_no_borrow ( ) : void
Subtract_equal_neg_is_zero ( ) : void
Subtract_equal_pos_is_zero ( ) : void
Subtract_from_zero_yields_negation ( ) : void
Subtract_opposite_sign_first_neg_is_add ( ) : void
Subtract_opposite_sign_first_pos_is_add ( ) : void
Subtract_zero_yields_this ( ) : void
TestBit_neg_inside ( ) : void
TestBit_neg_outside ( ) : void
TestBit_pos_inside ( ) : void
TestBit_pos_outside ( ) : void
TestDivRem ( BigInteger y, BigInteger mult, BigInteger add ) : void
TestKnuthExamples ( ) : void
ToString_detects_radix_too_large ( ) : void
ToString_fails_on_radix_too_small ( ) : void
ToString_long_base_10 ( ) : void
ToString_long_base_10_2 ( ) : void
ToString_long_base_16 ( ) : void
ToString_on_zero_works_for_all_radixes ( ) : void
ToString_simple_base_10 ( ) : void
ToString_simple_base_16 ( ) : void
ToString_simple_base_2 ( ) : void
ToString_simple_base_26 ( ) : void

Method Details

BitNot_neg() public method

public BitNot_neg ( ) : void
return void

Compare_neg_pos_is_minus1() public method

public Compare_neg_pos_is_minus1 ( ) : void
return void

Compare_negs_larger_len_first_is_minus1() public method

public Compare_negs_larger_len_first_is_minus1 ( ) : void
return void

Compare_negs_smaller_len_first_is_plus1() public method

public Compare_negs_smaller_len_first_is_plus1 ( ) : void
return void

Compare_pos_larger_len_first_is_plus1() public method

public Compare_pos_larger_len_first_is_plus1 ( ) : void
return void

Compare_pos_neg_is_plus1() public method

public Compare_pos_neg_is_plus1 ( ) : void
return void

Compare_pos_smaller_len_first_is_minus1() public method

public Compare_pos_smaller_len_first_is_minus1 ( ) : void
return void

Compare_same_is_0() public method

public Compare_same_is_0 ( ) : void
return void

Compare_same_len_larger_first_diff_in_LSB_is_plus1() public method

Compare_same_len_larger_first_diff_in_MSB_is_plus1() public method

Compare_same_len_larger_first_diff_in_middle_is_plus1() public method

Compare_same_len_smaller_first_diff_in_LSB_is_minus1() public method

Compare_same_len_smaller_first_diff_in_MSB_is_minus1() public method

Compare_same_len_smaller_first_diff_in_middle_is_minus1() public method

LeftShift_neg_big_shift() public method

public LeftShift_neg_big_shift ( ) : void
return void

LeftShift_neg_small_shift() public method

public LeftShift_neg_small_shift ( ) : void
return void

LeftShift_neg_whole_digit_shift_adds_zeros_at_end() public method

LeftShift_pos_big_shift() public method

public LeftShift_pos_big_shift ( ) : void
return void

LeftShift_pos_big_shift_zero_high_bits() public method

public LeftShift_pos_big_shift_zero_high_bits ( ) : void
return void

LeftShift_pos_small_shift() public method

public LeftShift_pos_small_shift ( ) : void
return void

LeftShift_pos_whole_digit_shift_adds_zeros_at_end() public method

RightShift_neg_big_shift() public method

public RightShift_neg_big_shift ( ) : void
return void

RightShift_neg_small_shift() public method

public RightShift_neg_small_shift ( ) : void
return void

RightShift_neg_whole_digit_shift_loses_whole_digits() public method

RightShift_pos_big_shift() public method

public RightShift_pos_big_shift ( ) : void
return void

RightShift_pos_big_shift_zero_high_bits() public method

public RightShift_pos_big_shift_zero_high_bits ( ) : void
return void

RightShift_pos_small_shift() public method

public RightShift_pos_small_shift ( ) : void
return void

RightShift_pos_whole_digit_shift_loses_whole_digits() public method

TestGDC() public method

public TestGDC ( int primes, bool apos, int apowers, bool bpos, int bpowers ) : void
primes int
apos bool
apowers int
bpos bool
bpowers int
return void