Tryag File Manager
Home
-
Turbo Force
Current Path :
/
usr
/
lib
/
python2.4
/
site-packages
/
ctypes
/
test
/
Upload File :
New :
File
Dir
//usr/lib/python2.4/site-packages/ctypes/test/test_byteswap.pyc
mò šóIFc @ sy d k Z d k Z d k Z d k Z d k l Z d k Td „ Z d e i f d „ ƒ YZ e d j o e i ƒ n d S( N( s hexlify( t *c C s t t | ƒ ƒ i ƒ S( N( t hexlifyt buffert st upper( R ( ( t= /usr/lib/python2.4/site-packages/ctypes/test/test_byteswap.pyt bin s t Testc B st t Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( Nc C sR t i t i IJx; t d ƒ D]- } t ƒ } t | d | d ƒ t | ƒ q Wd S( Ni s i%si ( t syst stderrt byteordert ranget it BITSt bitst setattrt dump( t selfR R ( ( R t X_test s c C sÞ t i d j o3 | i t i t j ƒ | i t i i t j ƒ n0 | i t i t j ƒ | i t i i t j ƒ t i d ƒ } | i t t i d d ƒ ƒ d ƒ | i t | ƒ d ƒ | i | i d ƒ t i d ƒ } | i t t i d d ƒ ƒ d ƒ | i t | ƒ d ƒ | i | i d ƒ t i d ƒ } | i t t i d d ƒ ƒ d ƒ | i t | ƒ d ƒ | i | i d ƒ t i d ƒ } | i t t i d d ƒ ƒ d ƒ | i t | ƒ d ƒ | i | i d ƒ d S( Nt littlei4 s >ht 1234s <ht 3412( R R R t failUnlesst c_shortt __ctype_le__t __ctype_be__R t failUnlessEqualR t structt packt valuet c_ushort( R R ( ( R t test_endian_short s* """"c C sÞ t i d j o3 | i t i t j ƒ | i t i i t j ƒ n0 | i t i t j ƒ | i t i i t j ƒ t i d ƒ } | i t t i d d ƒ ƒ d ƒ | i t | ƒ d ƒ | i | i d ƒ t i d ƒ } | i t t i d d ƒ ƒ d ƒ | i t | ƒ d ƒ | i | i d ƒ t i d ƒ } | i t t i d d ƒ ƒ d ƒ | i t | ƒ d ƒ | i | i d ƒ t i d ƒ } | i t t i d d ƒ ƒ d ƒ | i t | ƒ d ƒ | i | i d ƒ d S( NR ixV4s >it 12345678s <it 78563412s >Is <I( R R R R t c_intR R R R R R R R t c_uint( R R ( ( R t test_endian_int3 s* """"c C sÞ t i d j o3 | i t i t j ƒ | i t i i t j ƒ n0 | i t i t j ƒ | i t i i t j ƒ t i d ƒ } | i t t i d d ƒ ƒ d ƒ | i t | ƒ d ƒ | i | i d ƒ t i d ƒ } | i t t i d d ƒ ƒ d ƒ | i t | ƒ d ƒ | i | i d ƒ t i d ƒ } | i t t i d d ƒ ƒ d ƒ | i t | ƒ d ƒ | i | i d ƒ t i d ƒ } | i t t i d d ƒ ƒ d ƒ | i t | ƒ d ƒ | i | i d ƒ d S( NR l ïMW!âY¢ s >qt 1234567890ABCDEFs <qt EFCDAB9078563412s >Qs <Q( R R R R t c_longlongR R R R R R R R t c_ulonglong( R R ( ( R t test_endian_longlongO s* """"c C su t i d j o3 | i t i t j ƒ | i t i i t j ƒ n0 | i t i t j ƒ | i t i i t j ƒ t t i ƒ } | i t t i d t i ƒ ƒ t | ƒ ƒ | i | i t i d ƒ t i t i ƒ } | i | i t i d ƒ | i t t i d t i ƒ ƒ t | ƒ ƒ t i t i ƒ } | i | i t i d ƒ | i t t i d t i ƒ ƒ t | ƒ ƒ d S( NR t fi s <fs >f( R R R R t c_floatR R t matht piR R R R R t failUnlessAlmostEqualR ( R R ( ( R t test_endian_floatk s ++c C sl t i d j o3 | i t i t j ƒ | i t i i t j ƒ n0 | i t i t j ƒ | i t i i t j ƒ t t i ƒ } | i | i t i ƒ | i t t i d t i ƒ ƒ t | ƒ ƒ t i t i ƒ } | i | i t i ƒ | i t t i d t i ƒ ƒ t | ƒ ƒ t i t i ƒ } | i | i t i ƒ | i t t i d t i ƒ ƒ t | ƒ ƒ d S( NR t ds <ds >d( R R R R t c_doubleR R R, R- R R R R R R ( R R ( ( R t test_endian_double} s ++c C sˆ | i t i t j ƒ | i t i t j ƒ | i t i t j ƒ | i t i t j ƒ | i t i t j ƒ | i t i t j ƒ d S( N( R R t c_byteR R t c_ubytet c_char( R ( ( R t test_endian_otherŽ s c C sb t i d j o t } n t } d | f d „ ƒ Y} d t f d t f d t f d t f d t f d t f d t f d t f d t f d t f d t f d t f d t f d t d f d t d f d t d f d t d d d f g } | | _ xh t t t t ƒ f D]Q } | i d | f ƒ d | f d „ ƒ Y} | i t t | d d | f g ƒ q Wd S( NR t Tc B s t Z RS( N( t __name__t __module__( ( ( R R7 ž s t at bt cR0 t eR* t gt hR t kt lt mt nt b1i t b2t b3i t xc B s t Z RS( N( R8 R9 ( ( ( R R7 · s t _fields_( R R t BigEndianStructuret baset LittleEndianStructureR7 R4 R3 R R R"