<s> from rpython . rlib . rbigint import rbigint <EOL> from . . base import BaseTopazTest <EOL> class TestBignumObject ( BaseTopazTest ) : <EOL> def test_name ( self , space ) : <EOL> space . execute ( "<STR_LIT>" ) <EOL> def test_plus ( self , space ) : <EOL> w_res = space . execute ( "<STR_LIT>" ) <EOL> assert space . bigint_w ( w_res ) == rbigint . fromlong ( <NUM_LIT> ) <EOL> def test_sub ( self , space ) : <EOL> w_res = space . execute ( "<STR_LIT>" ) <EOL> assert space . bigint_w ( w_res ) == rbigint . fromint ( - <NUM_LIT:30> ) <EOL> def test_neg ( self , space ) : <EOL> w_res = space . execute ( "<STR_LIT>" ) <EOL> assert space . bigint_w ( w_res ) == rbigint . fromlong ( - <NUM_LIT> ) <EOL> def test_and ( self , space ) : <EOL> w_res = space . execute ( "<STR_LIT>" ) <EOL> assert space . bigint_w ( w_res ) == rbigint . fromlong ( <NUM_LIT> ) <EOL> def test_xor ( self , space ) : <EOL> w_res = space . execute ( "<STR_LIT>" ) <EOL> assert space . bigint_w ( w_res ) == rbigint . fromint ( <NUM_LIT> ) <EOL> def test_eq ( self , space ) : <EOL> w_res = space . execute ( "<STR_LIT>" ) <EOL> assert w_res is space . w_true <EOL> w_res = space . execute ( "<STR_LIT>" ) <EOL> assert w_res is space . w_false <EOL> def test_comparator ( self , space ) : <EOL> w_res = space . execute ( "<STR_LIT>" ) <EOL> assert space . int_w ( w_res ) == <NUM_LIT:1> <EOL> def test_hash ( self , space ) : <EOL> w_res = space . execute ( "<STR_LIT>" ) <EOL> assert w_res is space . w_true <EOL> w_res = space . execute ( "<STR_LIT>" ) <EOL> assert w_res is space . w_false <EOL> def test_coerce ( self , space ) : <EOL> w_res = space . execute ( "<STR_LIT>" ) <EOL> assert self . unwrap ( space , w_res ) == [ rbigint . fromint ( <NUM_LIT:12> ) , rbigint . fromlong ( <NUM_LIT> ) ] <EOL> w_res = space . execute ( "<STR_LIT>" ) <EOL> assert self . unwrap ( space , w_res ) == [ rbigint . fromlong ( <NUM_LIT> ) , rbigint . fromlong ( <NUM_LIT> ) ] <EOL> with self . raises ( space , "<STR_LIT>" , "<STR_LIT>" ) : <EOL> space . execute ( "<STR_LIT>" ) <EOL> def test_to_f ( self , space ) : <EOL> w_res = space . execute ( "<STR_LIT>" ) <EOL> assert space . float_w ( w_res ) == <NUM_LIT> <EOL> def test_pow ( self , space ) : <EOL> w_res = space . execute ( "<STR_LIT>" ) <EOL> assert self . unwrap ( space , w_res ) == rbigint . fromlong ( <NUM_LIT> ) <EOL> w_res = space . execute ( "<STR_LIT>" ) <EOL> assert self . unwrap ( space , w_res ) == <NUM_LIT:1.0> / <NUM_LIT> <EOL> w_res = space . execute ( "<STR_LIT>" ) <EOL> assert self . unwrap ( space , w_res ) == <NUM_LIT> <EOL> w_res = space . execute ( "<STR_LIT>" ) <EOL> assert self . unwrap ( space , w_res ) == <NUM_LIT> <EOL> with self . raises ( space , "<STR_LIT>" , "<STR_LIT>" ) : <EOL> space . execute ( "<STR_LIT>" ) </s>
