#NEWLINE# def test_pack_regA_int_no_sat( ) : #NEWLINE# #INDENT# X = np . array ( [ getrandbits ( 32 ) for i in range ( ( 8 * 16 ) ) ] ) . reshape ( 8 , 16 ) . astype ( 'uint32' ) #NEWLINE# Y = run_code ( pack_regA_int_no_sat , X ) #NEWLINE# assert all ( ( X [ 0 ] == Y [ 0 ] ) ) #NEWLINE# assert all ( ( ( X [ 1 ] & 65535 ) == ( ( Y [ 1 ] >> 0 ) & 65535 ) ) ) #NEWLINE# assert all ( ( ( X [ 2 ] & 65535 ) == ( ( Y [ 2 ] >> 16 ) & 65535 ) ) ) #NEWLINE# assert all ( ( ( ( X [ 3 ] & 255 ) * 16843009 ) == Y [ 3 ] ) ) #NEWLINE# assert all ( ( ( X [ 4 ] & 255 ) == ( ( Y [ 4 ] >> 0 ) & 255 ) ) ) #NEWLINE# assert all ( ( ( X [ 5 ] & 255 ) == ( ( Y [ 5 ] >> 8 ) & 255 ) ) ) #NEWLINE# assert all ( ( ( X [ 6 ] & 255 ) == ( ( Y [ 6 ] >> 16 ) & 255 ) ) ) #NEWLINE# assert all ( ( ( X [ 7 ] & 255 ) == ( ( Y [ 7 ] >> 24 ) & 255 ) ) )