-í
ê¶<c    "   s%  d  k  l Z l Z l Z d k Z d k Z e i d j Z [ e e i d d ƒ d e	 d ƒ j e j d ƒ d „  Z
 d „  Z d	 „  Z d
 „  Z e e i d ƒ e i d ƒ Z e d e i d ƒ j o e d ‚ n d Z d Z e i e ƒ Z e i e ƒ Z e d e j o& e d e e d e e e f ‚ n e e i d d ƒ e e i d d d d ƒ e e i d d ƒ e e i d d ƒ e i d d d ƒ Z e e i d e ƒ e e i d e ƒ d Z d Z d Z d Z d Z d Z d Z x[d d d d  d! d" f D]AZ x8d# d$ f D]*Z e e Z e o d% Ge GHn e i e e e e e e e e ƒ Z e i e e ƒ \ Z Z Z  Z! Z" Z# Z$ e e j ps e e j pf e  e j pY e! e j pL e" e j p? e% d& e# ƒ e% d& e ƒ j p e% d& e$ ƒ e% d& e ƒ j o8 e d' e& e ƒ e& e e e  e! e" e# e$ f ƒ f ‚ n qWqWd( d d d d f d) d d* d* d f d+ d d, d, d f d- d d d d f d. d/ d d d f d0 d/ d1 d1 d f d2 d/ d3 d3 d f d4 d/ d/ d/ d f d5 d/ d6 d6 d f d7 d/ d/ d8 d9 d/ d8 d9 d f d: d; d< d< d f d: d= d> d> d f d? d; d< d< d f d? d@ d> d> d f d1 dA dB dC d f d1 dD dE dF d f dG dA dB dC d f dG d dA dE dF d f d dH dI dJ d f d dK dL dM d f dN dO dI dJ d f dN dP dH dL dM d f dQ dH dI dJ d f dQ dK dL dM d f dR dO dI dJ d f dR dP dH dL dM d f dS dT dU dV d f d dT dW dX d f dS dY dZ d[ d f d dY d\ d] d f g Z' xee' D]]\ Z Z( Z) Z* Z+ e o e Ge( Ge) Ge* GHn x%d  e e) f d" e e) f d e e* f d! e e o e) p e* f g D]Û \ Z, Z- e i e, e( ƒ Z. e. e- j o! e d^ e e( e. e- f ‚ n e i e, ƒ Z/ e/ e0 e. ƒ j o! e d_ e, e/ e0 e. ƒ f ‚ n e i e, e. ƒ d Z1 e1 e( j o e+ o! e d` e e. e1 e( f ‚ n qWq‘Wd Z2 y e i da db ƒ Wn e i3 j
 o d Z2 n Xe o dc Ge2 o dd p de GHn e e i df dg ƒ e e i da d ƒ e e i df d ƒ dh „  Z4 e2 o e4 ƒ  n d k5 Z5 di f  dj „  ƒ  YZ6 xQ dk d f dl d f dm dn f do dn f dp dq f g D] Z7 e6 e7 Œ  Z8 e8 i9 ƒ  qñWdr „  Z: e: ƒ  d S(s   (   s
   TestFaileds   verboses   verifyNs   bigs   =ii   i    s%   bigendian determination appears wrongc    s'   t  |  ƒ } | i ƒ  d i | ƒ Sd  S(   Ns    (   s   lists   ss   charss   reverses   join(   s   ss   chars(    (    s&   /usr/lib/python2.2/test/test_struct.pys   string_reverse s    
c    s   t  o |  Sn t |  ƒ Sd  S(   N(   s   ISBIGENDIANs   values   string_reverse(   s   value(    (    s&   /usr/lib/python2.2/test/test_struct.pys   bigendian_to_native s    c    sD   y t  |  | ƒ Wn t i j
 o n Xt d |  i | f ‚ d  S(   Ns   %s%s did not raise struct.error(   s   applys   funcs   argss   structs   errors
   TestFaileds   __name__(   s   funcs   args(    (    s&   /usr/lib/python2.2/test/test_struct.pys
   simple_err s
    c    sM   y t  |  | ƒ Wn t i t t f j
 o n Xt d |  i | f ‚ d  S(   Ns   %s%s did not raise error(	   s   applys   funcs   argss   structs   errors   OverflowErrors	   TypeErrors
   TestFaileds   __name__(   s   funcs   args(    (    s&   /usr/lib/python2.2/test/test_struct.pys   any_err  s
    s   Zs   ii   s   iiis   inconsistent sizess   cbxxxxxxhhhhiillffds   3c3b18x12h6i6l6f3ds0   inconsistent sizes (3*%s -> 3*%d = %d, %s -> %d)s   foos   ds   flaps   iii   s   aiÿ   iÿÿ  i   f3.1415000000000002s    s   @s   <s   >s   =s   !s   xcbhilfds   xcBHILfds   trying:id   s#   unpack/pack not transitive (%s, %s)s   cs   xcs    as   cxs   a s   ss   0ss
   helloworlds   1ss   hs   9ss	   helloworls   10ss   11ss   helloworld s   20si
   s    s   bi   s   iùÿÿÿs   ùs   Biù   i¼  s   ¼s   ¼iDýÿÿs   ýDs   Dýs   Hi€,s   ,€s   €,i€âÓûs   ûÓâ€s   €âÓûs   Il   €Xl        s   ls   Ls   ff2.0s   @   s      @s   @       s          @f-2.0s   À   s      Às   À       s          Às    pack(%s, %s) -> %s # expected %ss    calcsize(%s) -> %d # expected %ds(   unpack(%s, %s) -> (%s,) # expected (%s,)s   qi   s   Platform has native q/Q?s   Yes.s   No.s   Qiÿÿÿÿc     s3  t  i d ƒ } xd d d | f d d d | f d d d | f d d d | d d	 f d d d
 | >d d | f d d d
 | d >d d d | d f f D]‰ \ } } } t  i | | ƒ } t | ƒ } t
 | | j d | | | | f ƒ t  i | | ƒ d }  t
 |  | j d | | |  | f ƒ q¢ Wd  S(   Ns   qiÿÿÿÿs   ÿi    s    s   Ql    i   s   i   s   s   %r-pack of %r gave %r, not %rs   %r-unpack of %r gave %r, not %r(   s   structs   calcsizes   bytess   formats   inputs   expecteds   packs   gots   bigendian_to_natives   native_expecteds   verifys   unpacks	   retrieved(   s	   retrieveds   native_expecteds   gots   expecteds   inputs   formats   bytes(    (    s&   /usr/lib/python2.2/test/test_struct.pys   test_native_qQž s    “ s	   IntTesterc      s;   t  Z d Z d „  Z e i e i e i d „ Z	 d „  Z
 RS(   Ns   bBhHiIlLc    sÄ   | |  _  xB d D]: } x1 | D]) } | | } t t i | ƒ | j ƒ q Wq W| |  _ | d |  _	 | \ |  _
 |  _ d |  _ d |  i	 d |  _ d |  i	 d |  _ d |  i	 d d |  _ d  S(   Ns   <>!=i   i    l    i   (   s
   formatpairs   selfs	   directions   codes   formats   verifys   structs   calcsizes   bytesizes   bitsizes   signed_codes   unsigned_codes   unsigned_mins   unsigned_maxs
   signed_mins
   signed_max(   s   selfs
   formatpairs   bytesizes	   directions   codes   format(    (    s&   /usr/lib/python2.2/test/test_struct.pys   __init__Ä s     	  
!		c 
   sO  t  o& d G|  i Gd G| Gd Gt | ƒ GHn |  i } |  i | j o |  i j n o£t	 | ƒ }	 | d j  o |	 d |  i >7}	 n t |	 ƒ d d !}	 t |	 ƒ d @o d	 |	 }	 n | |	 ƒ }	 d
 |  i t |	 ƒ |	 }	 d | } | | | ƒ } t | |	 j d | | | |	 f ƒ | | | ƒ d } t | | j d | | | | f ƒ t | | d | ƒ d | } t |	 ƒ }	 | | | ƒ } t | |	 j d | | | |	 f ƒ | | | ƒ d } t | | j d | | | | f ƒ t | | d | ƒ nQ | |  i j o t  o d G| GHn n) t | d | | ƒ t | d | | ƒ |  i } |  i | j o |  i j n od | } t	 | ƒ }	 t |	 ƒ d d !}	 t |	 ƒ d @o d	 |	 }	 n | |	 ƒ }	 d
 |  i t |	 ƒ |	 }	 | | | ƒ } t | |	 j d | | | |	 f ƒ | | | ƒ d } t | | j d | | | | f ƒ t | | d | ƒ d | } t |	 ƒ }	 | | | ƒ } t | |	 j d | | | |	 f ƒ | | | ƒ d } t | | j d | | | | f ƒ t | | d | ƒ nQ | |  i j o t  o d G| GHn n) t | d | | ƒ t | d | | ƒ d  S(   Ns
   trying stds   ons   ==i    l    i   iÿÿÿÿi   s   0s    s   >s   '%s'-pack of %r gave %r, not %rs!   '%s'-unpack of %r gave %r, not %rs   s   <s#   Skipping buggy range check for code(   s   verboses   selfs
   formatpairs   xs   hexs   signed_codes   codes
   signed_mins
   signed_maxs   longs   expecteds   bitsizes   lens	   unhexlifys   bytesizes   formats   packs   gots   verifys   unpacks	   retrieveds   any_errs   string_reverses   BUGGY_RANGE_CHECKs   unsigned_codes   unsigned_mins   unsigned_max(
   s   selfs   xs   packs   unpacks	   unhexlifys   codes   formats	   retrieveds   gots   expected(    (    s&   /usr/lib/python2.2/test/test_struct.pys   test_oneÓ s‚    &	$

	$

c    s{  d k  l } g  }
 x, t |  i d ƒ D] } |
 i d | >ƒ q' WxX t |  i ƒ D]G } d } x+ t |  i
 ƒ D] } | d >| d ƒ B} qn W|
 i | ƒ qR Wx} |
 D]u }	 xl |	 |	 f D]] } xT d d d	 f D]C } | | } y t | ƒ } Wn t j
 o n X|  i | ƒ qÎ Wq¸ Wq¤ WxW d
 D]O } xF |  i D]; } x2 d d d | f D] } t t i | | | ƒ qNWq4Wq$Wd  S(   N(   s	   randrangei   l    l    i   i   iÿÿÿÿi    i   s   <>s   a stringx0.042.0(   s   randoms	   randranges   valuess   ranges   selfs   bitsizes   exps   appends   is   vals   bytesizes   js   bases   incrs   xs   ints   OverflowErrors   test_ones	   directions
   formatpairs   codes	   badobjects   any_errs   structs   pack(   s   selfs	   badobjects   incrs   codes	   randranges   vals   is   js	   directions   bases   valuess   exps   x(    (    s&   /usr/lib/python2.2/test/test_struct.pys   runJs>          
 
  (   s   __name__s
   __module__s   BUGGY_RANGE_CHECKs   __init__s   structs   packs   unpacks   binasciis	   unhexlifys   test_ones   run(    (    (    s&   /usr/lib/python2.2/test/test_struct.pys	   IntTester¼ s   	ws   bBs   hHs   iIi   s   lLs   qQi   c     s*  x#d d d d f d d d d f d d d d f d	 d d
 d f d d d d f d d d d f d d d d f d d d d d d d d f g D]“ \ }  } } } t i |  | ƒ } | | j o  t d |  | | | f ƒ ‚ n t i |  | ƒ \ } | | j o  t d |  | | | f ƒ ‚ n q Wd  S(   Ns   ps   abcs    s    s   1ps   2ps   as   as   3ps   abs   abs   4ps   abcs   5ps   abc s   6ps   abc  s   1000ps   xiè  s   ÿiç  iÿ   s"   pack(%r, %r) == %r but expected %rs$   unpack(%r, %r) == %r but expected %r(	   s   codes   inputs   expecteds   expectedbacks   structs   packs   gots
   TestFaileds   unpack(   s   codes   expectedbacks   gots   expecteds   input(    (    s&   /usr/lib/python2.2/test/test_struct.pys   test_p_codexs     	 (;   s   test_supports
   TestFaileds   verboses   verifys   structs   syss	   byteorders   ISBIGENDIANs   packs   chrs   string_reverses   bigendian_to_natives
   simple_errs   any_errs   calcsizes   szs   fmts   fmt3s   sz3s   unpacks   ss   cs   bs   hs   is   ls   fs   ds   prefixs   formats   cps   bps   hps   ips   lps   fps   dps   ints   strs   testss   args   bigs   lils   asys   xfmts   exps   ress   ns   lens   revs   has_native_qQs   errors   test_native_qQs   binasciis	   IntTesters   argss   ts   runs   test_p_code(0   s   revs   verboses   ips   fmt3s   prefixs   args   ISBIGENDIANs   cps   structs   lils   ress   fmts
   simple_errs   test_p_codes   lps
   TestFaileds   hps	   IntTesters   fps   testss   formats   asys   bigs   string_reverses   argss   syss   any_errs   test_native_qQs   bps   sz3s   dps   xfmts   szs   cs   bs   ds   has_native_qQs   fs   is   hs   ls   ns   ss   binasciis   ts   exps   verifys   bigendian_to_native(    (    s&   /usr/lib/python2.2/test/test_struct.pys   ? s¨   		(			
	&  
$'ƒ@ÿ ÿ @# I !!)		°4 	