<s> """<STR_LIT>""" <EOL> from . import TestCase <EOL> import bitmath <EOL> class TestBitwiseOperations ( TestCase ) : <EOL> def setUp ( self ) : <EOL> self . leet = bitmath . Bit ( <NUM_LIT> ) <EOL> def test_left_shift ( self ) : <EOL> """<STR_LIT>""" <EOL> shifted = self . leet << <NUM_LIT:3> <EOL> self . assertEqual ( shifted , bitmath . Bit ( <NUM_LIT> ) ) <EOL> def test_right_shift ( self ) : <EOL> """<STR_LIT>""" <EOL> shifted = self . leet >> <NUM_LIT:3> <EOL> self . assertEqual ( shifted , bitmath . Bit ( <NUM_LIT> ) ) <EOL> def test_and ( self ) : <EOL> """<STR_LIT>""" <EOL> and_fifteen_hundred = self . leet & <NUM_LIT> <EOL> self . assertEqual ( and_fifteen_hundred , bitmath . Bit ( <NUM_LIT> ) ) <EOL> and_orig = self . leet & <NUM_LIT> <EOL> self . assertEqual ( and_orig , bitmath . Bit ( <NUM_LIT> ) ) <EOL> and_thousand = self . leet & <NUM_LIT:1000> <EOL> self . assertEqual ( and_thousand , bitmath . Bit ( <NUM_LIT> ) ) <EOL> and_five_hundred = self . leet & <NUM_LIT> <EOL> self . assertEqual ( and_five_hundred , bitmath . Bit ( <NUM_LIT> ) ) <EOL> def test_or ( self ) : <EOL> """<STR_LIT>""" <EOL> or_thousand = self . leet | <NUM_LIT:1000> <EOL> self . assertEqual ( or_thousand , bitmath . Bit ( <NUM_LIT> ) ) <EOL> or_five_hundred = self . leet | <NUM_LIT> <EOL> self . assertEqual ( or_five_hundred , bitmath . Bit ( <NUM_LIT> ) ) <EOL> def test_xor ( self ) : <EOL> """<STR_LIT>""" <EOL> xor_thousand = self . leet ^ <NUM_LIT:1000> <EOL> self . assertEqual ( xor_thousand , bitmath . Bit ( <NUM_LIT> ) ) <EOL> xor_five_hundred = self . leet ^ <NUM_LIT> <EOL> self . assertEqual ( xor_five_hundred , bitmath . Bit ( <NUM_LIT> ) ) </s>
