Ë
    pPêjF	  ã                  ó¸   — d Z ddlmZ ddlZddlmZ ddlmZ ddl	m
Z
 ddlmZmZ ddlmZ dd	lmZmZmZmZmZmZmZmZ dd
lmZ ddlmZ dgZ G d„ de«      Zy)z›Test runner for reference count opcode insertion transform test cases.

The transform inserts needed reference count increment/decrement
operations to IR.
é    )ÚannotationsN)ÚCompileError)Útest_temp_dir)ÚDataDrivenTestCase)ÚIS_FREE_THREADEDÚTOP_LEVEL_NAME)Úformat_func)ÚICODE_GEN_BUILTINSÚMypycDataSuiteÚassert_test_outputÚbuild_ir_for_single_fileÚ%infer_ir_build_options_from_test_nameÚremove_comment_linesÚreplace_word_sizeÚuse_custom_builtins)Úinsert_ref_count_opcodes)Úinsert_uninit_checkszrefcount.testc                  ó    — e Zd ZeZeZdZdd„Zy)ÚTestRefCountTransformTc                óÄ  — t        |j                  «      }|€yd|j                  v rt        ryd|j                  v rt        syt        t        j
                  j                  | j                  t        «      |«      5  t        |j                  «      }t        |«      }	 t        |j                  |«      }g }|D ]b  }|j                  t        k(  r|j                  j                  d«      sŒ2t!        |d«       t#        |«       |j%                  t'        |«      «       Œd 	 t-        ||d|«       ddd«       y# t(        $ r}|j*                  }Y d}~Œ1d}~ww xY w# 1 sw Y   yxY w)z4Perform a runtime checking transformation test case.NÚ_withgilÚ_nogilÚ	_toplevelTzInvalid source code output)r   Únamer   r   ÚosÚpathÚjoinÚdata_prefixr
   r   Úoutputr   r   Úinputr   Úendswithr   r   Úextendr	   r   Úmessagesr   )ÚselfÚtestcaseÚoptionsÚexpected_outputÚirÚactualÚfnÚes           ú]/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/mypyc/test/test_refcount.pyÚrun_casezTestRefCountTransform.run_case%   s.  € ä7¸¿¹ÓFˆØˆ?àØ˜Ÿ™Ñ&Õ+;àØ�x—}‘}Ñ$Õ-=àÜ ¤§¡§¡¨d×.>Ñ.>Ô@RÓ!SÐU]Ó^ñ 	`Ü2°8·?±?ÓCˆOÜ/°Ó@ˆOð3Ü-¨h¯n©n¸gÓF�ð �Øò 3�BØ—w‘w¤.Ò0¸¿¹×9OÑ9OÐP[Ô9\Ø Ü(¨¨TÔ2Ü,¨RÔ0Ø—M‘M¤+¨b£/Õ2ñ3ô ˜x¨Ð1MÈÔ_÷!	`ð 	`øô
  ò $ØŸ™•ûð$ú÷	`ð 	`ús7   Á;!EÂD4Â3A8EÄ4	EÄ=EÅ	EÅEÅEÅEN)r%   r   ÚreturnÚNone)Ú__name__Ú
__module__Ú__qualname__Úfilesr   Ú	base_pathÚoptional_outr-   © ó    r,   r   r       s   „ Ø€EØ€IØ€Lô`r7   r   )Ú__doc__Ú
__future__r   Úos.pathr   Úmypy.errorsr   Úmypy.test.configr   Úmypy.test.datar   Úmypyc.commonr   r   Úmypyc.ir.pprintr	   Úmypyc.test.testutilr
   r   r   r   r   r   r   r   Úmypyc.transform.refcountr   Úmypyc.transform.uninitr   r3   r   r6   r7   r,   ú<module>rC      sN   ðñõ #ã å $Ý *Ý -ß 9Ý '÷	÷ 	ó 	õ >Ý 7à	Ð€ô!`˜Nõ !`r7   