ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     
hc           @   s   d  Z  d Z d d l Z d d l Z d d l Z d d l m Z d d l m Z y e	 Wn e
 k
 rq e Z	 n Xd   Z d   Z d   Z d	   Z d
   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d e j f d     YZ d S(   sp   Utilities for Python proto2 tests.

This is intentionally modeled on C++ code in
//google/protobuf/test_util.*.
s#   robinson@google.com (Will Robinson)iN(   t   unittest_import_pb2(   t   unittest_pb2c         C   s   |  j  j d k S(   Nt   proto2(   t
   DESCRIPTORt   syntax(   t   message(    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   IsProto27   s    c         C   sr  d |  _  d |  _ d |  _ d |  _ d |  _ d |  _ d |  _ d |  _ d	 |  _ d
 |  _	 d |  _
 d |  _ t |  _ d |  _ d |  _ t |   r d |  j _ n  d |  j _ d |  j _ d |  j _ d |  j _ t j j |  _ t j |  _  t |   rt! j" |  _# n  d |  _$ d |  _% |  j& j' d  |  j( j' d  |  j) j' d  |  j* j' d  |  j+ j' d  |  j, j' d  |  j- j' d  |  j. j' d  |  j/ j' d  |  j0 j' d  |  j1 j' d   |  j2 j' d!  |  j3 j' t  |  j4 j' d"  |  j5 j' d#  t |   r+d$ |  j6 j7   _ n  d% |  j8 j7   _ d& |  j9 j7   _ d' |  j: j7   _ d( |  j; j7   _ |  j< j' t j j=  |  j> j' t j?  t |   r|  j@ j' t! jA  n  |  jB j' d)  |  jC j' d*  |  j& j' d+  |  j( j' d+  |  j) j' d+  |  j* j' d+  |  j+ j' d+  |  j, j' d+  |  j- j' d+  |  j. j' d+  |  j/ j' d+  |  j0 j' d+  |  j1 j' d+  |  j2 j' d+  |  j3 j' t  |  j4 j' d,  |  j5 j' d-  d. |  j& d/ <d0 |  j( d/ <d1 |  j) d/ <d2 |  j* d/ <d3 |  j+ d/ <d4 |  j, d/ <d5 |  j- d/ <d6 |  j. d/ <d7 |  j/ d/ <d8 |  j0 d/ <d9 |  j1 d/ <d: |  j2 d/ <tD |  j3 d/ <d; |  j4 d/ <d< |  j5 d/ <t |   rd= |  j6 j7   _ n  d> |  j8 j7   _ d? |  j9 j7   _ d@ |  j: j7   _ dA |  j; j7   _ |  j< j' t j j=  t j j |  j< d/ <|  j> j' t j  t |   rX|  j@ j' t! j"  n  |  jB j' dB  |  jC j' dC  t |   rGdD |  _E dE |  _F dF |  _G dG |  _H dH |  _I dI |  _J dJ |  _K dK |  _L dL |  _M dM |  _N dN |  _O dO |  _P tD |  _Q dP |  _R dQ |  _S t j jT |  _U t jV |  _W t! jX |  _Y dR |  _Z dS |  _[ n  dT |  _\ dU |  j] _ dV |  _^ dW |  __ dX S(Y   sm   Sets every non-lazy field in the message to a unique value.

  Args:
    message: A TestAllTypes instance.
  ie   if   ig   ih   ii   ij   ik   il   im   in   io   ip   u   115t   116iu   iv   iw   ix   i~   u   124u   125i   i   i   i   i   i   i   i   i   i   i   i   u   215t   216i   i   i   i   i   u   224u   225i    u   0t   0i-  i   i.  i/  i0  i1  i2  i3  i4  i5  i6  i7  i8  u   315t   316i=  i>  i?  i@  iG  u   324u   325i  i  i  i  i  i  i  i  i  i  i  i  t   415t   416t   424t   425iY  iZ  t   603t   604N(`   t   optional_int32t   optional_int64t   optional_uint32t   optional_uint64t   optional_sint32t   optional_sint64t   optional_fixed32t   optional_fixed64t   optional_sfixed32t   optional_sfixed64t   optional_floatt   optional_doublet   Truet   optional_boolt   optional_stringt   optional_bytesR   t   optionalgroupt   at   optional_nested_messaget   bbt   optional_foreign_messaget   ct   optional_import_messaget   dt   optional_public_import_messaget   eR   t   TestAllTypest   BAZt   optional_nested_enumt   FOREIGN_BAZt   optional_foreign_enumR    t
   IMPORT_BAZt   optional_import_enumt   optional_string_piecet   optional_cordt   repeated_int32t   appendt   repeated_int64t   repeated_uint32t   repeated_uint64t   repeated_sint32t   repeated_sint64t   repeated_fixed32t   repeated_fixed64t   repeated_sfixed32t   repeated_sfixed64t   repeated_floatt   repeated_doublet   repeated_boolt   repeated_stringt   repeated_bytest   repeatedgroupt   addt   repeated_nested_messaget   repeated_foreign_messaget   repeated_import_messaget   repeated_lazy_messaget   repeated_nested_enumt   BARt   repeated_foreign_enumt   FOREIGN_BARt   repeated_import_enumt
   IMPORT_BARt   repeated_string_piecet   repeated_cordt   Falset   default_int32t   default_int64t   default_uint32t   default_uint64t   default_sint32t   default_sint64t   default_fixed32t   default_fixed64t   default_sfixed32t   default_sfixed64t   default_floatt   default_doublet   default_boolt   default_stringt   default_bytest   FOOt   default_nested_enumt   FOREIGN_FOOt   default_foreign_enumt
   IMPORT_FOOt   default_import_enumt   default_string_piecet   default_cordt   oneof_uint32t   oneof_nested_messaget   oneof_stringt   oneof_bytes(   R   (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   SetAllNonLazyFields;   s    																																			c         C   s   t  |   d |  j _ d  S(   Ni   (   Rn   t   optional_lazy_messageR$   (   R   (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   SetAllFields   s    
c         C   s  |  j  } t } t } d | | j <d | | j <d | | j <d | | j <d | | j <d | | j <d | | j	 <d | | j
 <d	 | | j <d
 | | j <d | | j <d | | j <t | | j <d | | j <d | | j <d | | j _ d | | j _ d | | j _ d | | j _ d | | j _ d | | j _ | j j | | j  <| j j | | j  <| j! | | j" <| j# | | j$ <d | | j% <d | | j& <| | j' j( d  | | j) j( d  | | j* j( d  | | j+ j( d  | | j, j( d  | | j- j( d  | | j. j( d  | | j/ j( d  | | j0 j( d  | | j1 j( d   | | j2 j( d!  | | j3 j( d"  | | j4 j( t  | | j5 j( d#  | | j6 j( d$  d% | | j7 j8   _ d& | | j9 j8   _ d' | | j: j8   _ d( | | j; j8   _ d) | | j< j8   _ | | j= j( | j j>  | | j? j( | j@  | | jA j( | jB  | | jC j( d*  | | jD j( d+  | | j' j( d,  | | j) j( d-  | | j* j( d.  | | j+ j( d/  | | j, j( d0  | | j- j( d1  | | j. j( d2  | | j/ j( d3  | | j0 j( d4  | | j1 j( d5  | | j2 j( d6  | | j3 j( d7  | | j4 j( tE  | | j5 j( d8  | | j6 j( d9  d: | | j7 j8   _ d; | | j9 j8   _ d< | | j: j8   _ d= | | j; j8   _ d> | | j< j8   _ | | j= j( | j j  | | j? j( | j!  | | jA j( | j#  | | jC j( d?  | | jD j( d@  dA | | jF <dB | | jG <dC | | jH <dD | | jI <dE | | jJ <dF | | jK <dG | | jL <dH | | jM <dI | | jN <dJ | | jO <dK | | jP <dL | | jQ <tE | | jR <dM | | jS <dN | | jT <| j jU | | jV <| jW | | jX <| jY | | jZ <dO | | j[ <dP | | j\ <dQ | | j] <dR | | j^ _ dS | | j_ <dT | | j` <dU S(V   sz   Sets every extension in the message to a unique value.

  Args:
    message: A unittest_pb2.TestAllExtensions instance.
  ie   if   ig   ih   ii   ij   ik   il   im   in   io   ip   u   115R   iu   iv   iw   ix   i~   i   u   124u   125i   i   i   i   i   i   i   i   i   i   i   i   u   215R   i   i   i   i   i   u   224u   225i-  i.  i/  i0  i1  i2  i3  i4  i5  i6  i7  i8  u   315R
   i=  i>  i?  i@  iG  u   324u   325i  i  i  i  i  i  i  i  i  i  i  i  u   415R   u   424R   iY  iZ  u   603R   N(a   t
   ExtensionsR   R    t   optional_int32_extensiont   optional_int64_extensiont   optional_uint32_extensiont   optional_uint64_extensiont   optional_sint32_extensiont   optional_sint64_extensiont   optional_fixed32_extensiont   optional_fixed64_extensiont   optional_sfixed32_extensiont   optional_sfixed64_extensiont   optional_float_extensiont   optional_double_extensionR   t   optional_bool_extensiont   optional_string_extensiont   optional_bytes_extensiont   optionalgroup_extensionR"   t!   optional_nested_message_extensionR$   t"   optional_foreign_message_extensionR&   t!   optional_import_message_extensionR(   t(   optional_public_import_message_extensionR*   t   optional_lazy_message_extensionR+   R,   t   optional_nested_enum_extensionR.   t   optional_foreign_enum_extensionR0   t   optional_import_enum_extensiont   optional_string_piece_extensiont   optional_cord_extensiont   repeated_int32_extensionR5   t   repeated_int64_extensiont   repeated_uint32_extensiont   repeated_uint64_extensiont   repeated_sint32_extensiont   repeated_sint64_extensiont   repeated_fixed32_extensiont   repeated_fixed64_extensiont   repeated_sfixed32_extensiont   repeated_sfixed64_extensiont   repeated_float_extensiont   repeated_double_extensiont   repeated_bool_extensiont   repeated_string_extensiont   repeated_bytes_extensiont   repeatedgroup_extensionRE   t!   repeated_nested_message_extensiont"   repeated_foreign_message_extensiont!   repeated_import_message_extensiont   repeated_lazy_message_extensiont   repeated_nested_enum_extensionRK   t   repeated_foreign_enum_extensionRM   t   repeated_import_enum_extensionRO   t   repeated_string_piece_extensiont   repeated_cord_extensionRR   t   default_int32_extensiont   default_int64_extensiont   default_uint32_extensiont   default_uint64_extensiont   default_sint32_extensiont   default_sint64_extensiont   default_fixed32_extensiont   default_fixed64_extensiont   default_sfixed32_extensiont   default_sfixed64_extensiont   default_float_extensiont   default_double_extensiont   default_bool_extensiont   default_string_extensiont   default_bytes_extensionRb   t   default_nested_enum_extensionRd   t   default_foreign_enum_extensionRf   t   default_import_enum_extensiont   default_string_piece_extensiont   default_cord_extensiont   oneof_uint32_extensiont   oneof_nested_message_extensiont   oneof_string_extensiont   oneof_bytes_extension(   R   t
   extensionst   pb2t
   import_pb2(    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   SetAllExtensions   s    	c         C   s?   d |  _  d |  _ d |  _ d |  j t j <d |  j t j <d S(   s   Sets every field and extension in the message to a unique value.

  Args:
    message: A unittest_pb2.TestAllExtensions message.
  i   t   foog      ?i   t   barN(   t   my_intt	   my_stringt   my_floatRq   R   t   my_extension_intt   my_extension_string(   R   (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   SetAllFieldsAndExtensionsm  s
    			c         C   s"  t  j } t  j } g  } t  j   } d | _ | j | j    | j   d | j | <| j | j    | j   d | _	 | j | j    | j   d | j | <| j | j    | j   d | _
 | j | j    | j   d j |  } | |  k rt d | |  f   n  d S(	   s   Ensures that serialized is the serialization we expect for a message
  filled with SetAllFieldsAndExtensions().  (Specifically, ensures that the
  serialization is in canonical, tag-number order).
  i   i   R   R   g      ?t    s   Expected %r, found %rN(   R   R   R   t   TestFieldOrderingsR   R5   t   SerializeToStringt   ClearRq   R   R   t   joint
   ValueError(   t
   serializedR   R   t   expected_stringsR   t   expected(    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt#   ExpectAllFieldsAndExtensionsInOrderz  s,    			

	

	
c         C   s  |  j  | j d   |  j  | j d   |  j  | j d   |  j  | j d   |  j  | j d   |  j  | j d   |  j  | j d   |  j  | j d   |  j  | j d	   |  j  | j d
   |  j  | j d   |  j  | j d   |  j  | j d   |  j  | j d   |  j  | j d   t |  ro|  j  | j d   n  |  j  | j d   |  j  | j d   |  j  | j d   |  j  | j j d   |  j  | j j d   |  j  | j j d   |  j  | j j d   |  j  | j d   |  j  | j d   t |  rf|  j  | j d   n  |  j  | j d   |  j  | j d   |  j d | j  |  j d | j	  |  j d | j
  |  j d  | j  |  j d! | j  |  j d" | j  |  j d# | j  |  j d$ | j  |  j d% | j  |  j d& | j  |  j d' | j  |  j d( | j  |  j t | j  |  j d) | j  |  j d* | j  t |  r|  j d+ | j j  n  |  j d, | j j  |  j d- | j j  |  j d. | j j  |  j d/ | j j  |  j d0 | j j  |  j t j  j! | j"  |  j t j# | j$  t |  r|  j t% j& | j'  n  |  j d1 t( | j)   |  j d1 t( | j*   |  j d1 t( | j+   |  j d1 t( | j,   |  j d1 t( | j-   |  j d1 t( | j.   |  j d1 t( | j/   |  j d1 t( | j0   |  j d1 t( | j1   |  j d1 t( | j2   |  j d1 t( | j3   |  j d1 t( | j4   |  j d1 t( | j5   |  j d1 t( | j6   |  j d1 t( | j7   t |  r5|  j d1 t( | j8   n  |  j d1 t( | j9   |  j d1 t( | j:   |  j d1 t( | j;   |  j d1 t( | j<   |  j d1 t( | j=   t |  r|  j d1 t( | j>   n  |  j d1 t( | j?   |  j d1 t( | j@   |  j d2 | j) d3  |  j d4 | j* d3  |  j d5 | j+ d3  |  j d6 | j, d3  |  j d7 | j- d3  |  j d8 | j. d3  |  j d9 | j/ d3  |  j d: | j0 d3  |  j d; | j1 d3  |  j d< | j2 d3  |  j d= | j3 d3  |  j d> | j4 d3  |  j t | j5 d3  |  j d? | j6 d3  |  j d@ | j7 d3  t |  r|  j dA | j8 d3 j  n  |  j dB | j9 d3 j  |  j dC | j: d3 j  |  j dD | j; d3 j  |  j dE | jA d3 j  |  j t j  jB | j< d3  |  j t jC | j= d3  t |  rV	|  j t% jD | j> d3  n  |  j dF | j) dG  |  j dH | j* dG  |  j dI | j+ dG  |  j dJ | j, dG  |  j dK | j- dG  |  j dL | j. dG  |  j dM | j/ dG  |  j dN | j0 dG  |  j dO | j1 dG  |  j dP | j2 dG  |  j dQ | j3 dG  |  j dR | j4 dG  |  j tE | j5 dG  |  j dS | j6 dG  |  j dT | j7 dG  t |  r
|  j dU | j8 dG j  n  |  j dV | j9 dG j  |  j dW | j: dG j  |  j dX | j; dG j  |  j dY | jA dG j  |  j t j  j! | j< dG  |  j t j# | j= dG  t |  r|  j t% j& | j> dG  n  t |  r|  j  | j dZ   |  j  | j d[   |  j  | j d\   |  j  | j d]   |  j  | j d^   |  j  | j d_   |  j  | j d`   |  j  | j da   |  j  | j db   |  j  | j dc   |  j  | j dd   |  j  | j de   |  j  | j df   |  j  | j dg   |  j  | j dh   |  j  | j di   |  j  | j dj   |  j  | j dk   |  j dl | jF  |  j dm | jG  |  j dn | jH  |  j do | jI  |  j dp | jJ  |  j dq | jK  |  j dr | jL  |  j ds | jM  |  j dt | jN  |  j du | jO  |  j dv | jP  |  j dw | jQ  |  j tE | jR  |  j dx | jS  |  j dy | jT  |  j t j  jU | jV  |  j t jW | jX  |  j t% jY | jZ  n  dz S({   sF   Check all fields for correct values have after Set*Fields() is called.R   R   R   R   R   R   R   R   R   R   R   R   R   R   R    R!   R#   R%   R'   R"   R$   R&   R(   R-   R/   R1   R2   R3   ie   if   ig   ih   ii   ij   ik   il   im   in   io   ip   t   115R   iu   iv   iw   ix   i~   i   i   i   i    i   i   i   i   i   i   i   i   i   i   i   t   215R   i   i   i   i   i   i-  i   i.  i/  i0  i1  i2  i3  i4  i5  i6  i7  i8  t   315R
   i=  i>  i?  i@  iG  RS   RT   RU   RV   RW   RX   RY   RZ   R[   R\   R]   R^   R_   R`   Ra   Rc   Re   Rg   i  i  i  i  i  i  i  i  i  i  i  i  R   R   N([   t
   assertTruet   HasFieldR   R!   R#   R%   R'   t   assertEqualR   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R    R"   R$   R&   R(   R)   R*   Ro   R   R+   R,   R-   R.   R/   R    R0   R1   t   lenR4   R6   R7   R8   R9   R:   R;   R<   R=   R>   R?   R@   RA   RB   RC   RD   RF   RG   RH   RJ   RL   RN   RP   RQ   RI   RK   RM   RO   RR   RS   RT   RU   RV   RW   RX   RY   RZ   R[   R\   R]   R^   R_   R`   Ra   Rb   Rc   Rd   Re   Rf   Rg   (   t	   test_caseR   (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   ExpectAllFieldsSet  sj   



c         C   s   d } xq t  j j |  ry t  j j t  j j | d   ra t  j j | d |   } t | d  St  j j | d  } q	 Wd } t  j j | d |   } t  j j |  r t | d  St d   d S(	   sF   Finds the given golden file and returns a file object representing it.t   .s   src/google/protobufs   src/google/protobuf/testdatat   rbs   ..s'   third_party/py/google/protobuf/testdatas   Could not find golden files.  This test must be run from within the protobuf source package so that it can read test data files from the C++ source tree.N(   t   ost   patht   existsR   t   opent   RuntimeError(   t   filenameR   t	   full_path(    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt
   GoldenFilei  s    !	c         C   s#   t  |    } | j   SWd QXd S(   s5   Finds the given golden file and returns its contents.N(   R   t   read(   R   t   f(    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   GoldenFileData  s    c         C   s>  |  j  j d d g  |  j j d d g  |  j j d d g  |  j j d d g  |  j j d	 d
 g  |  j j d d g  |  j j d d g  |  j j d d g  |  j	 j d d g  |  j
 j d d g  |  j j d d g  |  j j d d g  |  j j t t g  |  j j t j t j g  d S(   sg   Sets every field in the message to a unique value.

  Args:
    message: A TestPackedTypes instance.
  iY  i  iZ  i  i[  i  i\  i  i]  i  i^  i  i_  i  i`  i  ia  i  ib  i  g     @g     8@g      @g     @@N(   t   packed_int32t   extendt   packed_int64t   packed_uint32t   packed_uint64t   packed_sint32t   packed_sint64t   packed_fixed32t   packed_fixed64t   packed_sfixed32t   packed_sfixed64t   packed_floatt   packed_doublet   packed_boolR   RR   t   packed_enumR   RM   R.   (   R   (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   SetAllPackedFields  s    c         C   s  |  j  } t } | | j j d d g  | | j j d d g  | | j j d d g  | | j j d d g  | | j j d	 d
 g  | | j j d d g  | | j	 j d d g  | | j
 j d d g  | | j j d d g  | | j j d d g  | | j j d d g  | | j j d d g  | | j j t t g  | | j j t j t j g  d S(   s}   Sets every extension in the message to a unique value.

  Args:
    message: A unittest_pb2.TestPackedExtensions instance.
  iY  i  iZ  i  i[  i  i\  i  i]  i  i^  i  i_  i  i`  i  ia  i  ib  i  g     @g     8@g      @g     @@N(   Rq   R   t   packed_int32_extensionR   t   packed_int64_extensiont   packed_uint32_extensiont   packed_uint64_extensiont   packed_sint32_extensiont   packed_sint64_extensiont   packed_fixed32_extensiont   packed_fixed64_extensiont   packed_sfixed32_extensiont   packed_sfixed64_extensiont   packed_float_extensiont   packed_double_extensiont   packed_bool_extensionR   RR   t   packed_enum_extensionRM   R.   (   R   R   R   (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   SetAllPackedExtensions  s"    	c         C   s>  |  j  j d d g  |  j j d d g  |  j j d d g  |  j j d d g  |  j j d	 d
 g  |  j j d d g  |  j j d d g  |  j j d d g  |  j	 j d d g  |  j
 j d d g  |  j j d d g  |  j j d d g  |  j j t t g  |  j j t j t j g  d S(   sv   Sets every field in the message to a unique value.

  Args:
    message: A unittest_pb2.TestUnpackedTypes instance.
  iY  i  iZ  i  i[  i  i\  i  i]  i  i^  i  i_  i  i`  i  ia  i  ib  i  g     @g     8@g      @g     @@N(   t   unpacked_int32R   t   unpacked_int64t   unpacked_uint32t   unpacked_uint64t   unpacked_sint32t   unpacked_sint64t   unpacked_fixed32t   unpacked_fixed64t   unpacked_sfixed32t   unpacked_sfixed64t   unpacked_floatt   unpacked_doublet   unpacked_boolR   RR   t   unpacked_enumR   RM   R.   (   R   (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   SetAllUnpackedFields  s    t   NonStandardIntegerc           B   s  e  Z d  Z d* d  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 d   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 d   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* d(   Z+ d)   Z, RS(+   s  An integer object that does not subclass int.

  This is used to verify that both C++ and regular proto systems can handle
  integer others than int and long and that they handle them in predictable
  ways.

  NonStandardInteger is the minimal legal specification for a custom Integral.
  As such, it does not support 0 < x < 5 and it is not hashable.

  Note: This is added here instead of relying on numpy or a similar library
  with custom integers to limit dependencies.
  c         C   s1   t  | t  r | j } n  | |  _ | |  _ d  S(   N(   t
   isinstanceR  t   valt   error_string_on_conversion(   t   selfR  R  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __init__  s    	c         C   s(   |  j  r t |  j    n  t |  j  S(   N(   R  R   t   longR  (   R  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __long__  s    	c         C   s   t  t j |  j   S(   N(   R  t   operatort   absR  (   R  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __abs__  s    c         C   s   t  t j |  j |   S(   N(   R  R  RE   R  (   R  t   y(    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __add__  s    c         C   s   t  t j |  j |   S(   N(   R  R  t   divR  (   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __div__  s    c         C   s   t  j |  j |  S(   N(   R  t   eqR  (   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __eq__  s    c         C   s   t  t j |  j |   S(   N(   R  R  t   floordivR  (   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __floordiv__  s    c         C   s   t  t j |  j |   S(   N(   R  R  t   truedivR  (   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __truediv__  s    c         C   s   t  t j |  j   S(   N(   R  R  t   invertR  (   R  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt
   __invert__  s    c         C   s   t  t j |  j |   S(   N(   R  R  t   modR  (   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __mod__   s    c         C   s   t  t j |  j |   S(   N(   R  R  t   mulR  (   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __mul__  s    c         C   s   t  t j |  j   S(   N(   R  R  t   negR  (   R  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __neg__  s    c         C   s   t  t j |  j   S(   N(   R  R  t   posR  (   R  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __pos__	  s    c         C   s   t  t j |  j |   S(   N(   R  R  t   powR  (   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __pow__  s    c         C   s   t  |  j  S(   N(   t   intR  (   R  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt	   __trunc__  s    c         C   s   t  t j | |  j   S(   N(   R  R  RE   R  (   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __radd__  s    c         C   s   t  t j | |  j   S(   N(   R  R  R$  R  (   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __rdiv__  s    c         C   s   t  t j | |  j   S(   N(   R  R  R.  R  (   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __rmod__  s    c         C   s   t  t j | |  j   S(   N(   R  R  R0  R  (   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __rmul__  s    c         C   s   t  t j | |  j   S(   N(   R  R  R6  R  (   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __rpow__  s    c         C   s   t  t j | |  j   S(   N(   R  R  R(  R  (   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __rfloordiv__!  s    c         C   s   t  t j | |  j   S(   N(   R  R  R*  R  (   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __rtruediv__$  s    c         C   s   t  t j |  j |   S(   N(   R  R  t   lshiftR  (   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt
   __lshift__'  s    c         C   s   t  t j |  j |   S(   N(   R  R  t   rshiftR  (   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt
   __rshift__*  s    c         C   s   t  t j | |  j   S(   N(   R  R  RA  R  (   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __rlshift__-  s    c         C   s   t  t j | |  j   S(   N(   R  R  RC  R  (   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __rrshift__0  s    c         C   s.   t  | t  r | j } n  t j |  j |  S(   N(   R  R  R  R  t   le(   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __le__3  s    c         C   s.   t  | t  r | j } n  t j |  j |  S(   N(   R  R  R  R  t   lt(   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __lt__8  s    c         C   s   t  t j |  j |   S(   N(   R  R  t   and_R  (   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __and__=  s    c         C   s   t  t j |  j |   S(   N(   R  R  t   or_R  (   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __or__@  s    c         C   s   t  t j |  j |   S(   N(   R  R  t   xorR  (   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __xor__C  s    c         C   s   t  t j | |  j   S(   N(   R  R  RK  R  (   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __rand__F  s    c         C   s   t  t j | |  j   S(   N(   R  R  RM  R  (   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __ror__I  s    c         C   s   t  t j | |  j   S(   N(   R  R  RO  R  (   R  R"  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __rxor__L  s    c         C   s   |  j  S(   N(   R  (   R  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __bool__O  s    c         C   s   |  j  S(   N(   R  (   R  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __nonzero__R  s    c         C   s   |  S(   N(    (   R  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __ceil__U  s    c         C   s   |  S(   N(    (   R  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt	   __floor__X  s    c         C   s(   |  j  r t |  j    n  t |  j  S(   N(   R  R   R8  R  (   R  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __int__[  s    	c         C   s   |  S(   N(    (   R  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt	   __round__`  s    c         C   s   d |  j  S(   Ns   NonStandardInteger(%s)(   R  (   R  (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   __repr__c  s    N(-   t   __name__t
   __module__t   __doc__t   NoneR  R  R!  R#  R%  R'  R)  R+  R-  R/  R1  R3  R5  R7  R9  R:  R;  R<  R=  R>  R?  R@  RB  RD  RE  RF  RH  RJ  RL  RN  RP  RQ  RR  RS  RT  RU  RV  RW  RX  RY  RZ  (    (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyR    sT   																																							(   R]  t
   __author__t   numbersR  t   os.pathR   t   google.protobufR    R   R  t	   NameErrorR8  R   Rn   Rp   R   R   R   R   R   R   R   R  R  t   IntegralR  (    (    (    sF   /usr/lib/python2.7/site-packages/google/protobuf/internal/test_util.pyt   <module>#   s.   
												