ķ oŽ¸Qc@sXddlZddlZddlTdejfd„ƒYZedkrTejƒndS(i˙˙˙˙N(t*tMemFunctionsTestcBsQeZd„Zd„Zd„Zd„ZyeWnek rEn Xd„ZRS(cCsĸtdƒ}d}t||t|ƒƒ}|j|jdƒ|jt|ƒdƒ|jt|dƒdƒ|jt|dƒdƒ|jt|dƒdƒdS( Ni@Bs Hello, WorlditHelloisHello, Worldit(tcreate_string_buffertmemmovetlent assertEqualtvaluet string_at(tselftatptresult((s3/sys/lib/python2.7/ctypes/test/test_memfunctions.pyt test_memmoves cCs€tdƒ}t|tdƒdƒ}|j|jdƒ|jt|ƒdƒ|jt|ƒdƒ|jt|dƒdƒdS(Ni@Btxitxxxxxxxxxxxxxxxxitxxxxxxxxxxxxxxxx(RtmemsettordRRR (R R R ((s3/sys/lib/python2.7/ctypes/test/test_memfunctions.pyt test_memsets  c CsZtdttdƒŒ}|jt|tƒjdƒ|jt|ttƒƒd dddddd d gƒ|jt|ttƒƒddd…dddddd d gƒ|jt|ttƒƒd d d …d d dddddgƒ|jt|ttƒƒddd …dddd gƒ|jt|ttƒƒddd…dgƒdS(Ni tabcdefiiaibicidieifiii˙˙˙˙i( tc_ubytetmapRRtcasttc_char_pRtPOINTERtc_bytetNone(R R ((s3/sys/lib/python2.7/ctypes/test/test_memfunctions.pyt test_cast&s%%%%cCsktdƒ}|jdtj|ƒƒ|j|dƒ|jtddƒdƒ|jtddƒdƒdS(Nsfoo bariisfoo baritfoo(R Rtsyst getrefcountt assertTrue(R ts((s3/sys/lib/python2.7/ctypes/test/test_memfunctions.pyttest_string_at4s  cCs˛tdƒ}tdƒ}t||t|ƒttƒƒ}|j|jdƒ|jt|ƒdƒ|jt|dƒdƒ|jt|dƒdƒ|jt|dƒdƒdS( Ns Hello, Worldi@BiRisHello, WorldiR(tcreate_unicode_bufferRRtsizeoftc_wcharRRt wstring_at(R R R R ((s3/sys/lib/python2.7/ctypes/test/test_memfunctions.pyttest_wstring_atCs  "( t__name__t __module__RRRR#R$t NameErrorR((((s3/sys/lib/python2.7/ctypes/test/test_memfunctions.pyRs   t__main__(RtunittesttctypestTestCaseRR)tmain(((s3/sys/lib/python2.7/ctypes/test/test_memfunctions.pyts   I